:root {
  --bg0: #e8f3ef;
  --bg1: #f4faf7;
  --ink: #143028;
  --muted: #5d736a;
  --line: #cfe0d8;
  --panel: rgba(255, 255, 255, 0.86);
  --brand: #0f6b57;
  --brand-deep: #0a4f40;
  --accent: #e4572e;
  --accent-soft: #ffe8e1;
  --ok: #0f6b57;
  --maybe: #b7791f;
  --no: #b42318;
  --shadow: 0 18px 50px rgba(20, 48, 40, 0.08);
  --radius: 18px;
  --font: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
  background:
    radial-gradient(1200px 500px at 10% -10%, #c8ebe0 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #ffe4d8 0%, transparent 45%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 40%, #eef7f3);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }

.page-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.container { width: min(100% - 32px, 960px); margin: 0 auto; }
main.container {
  flex: 1;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(244, 250, 247, 0.82);
  border-bottom: 1px solid rgba(207, 224, 216, 0.8);
  padding-top: env(safe-area-inset-top, 0);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

.lang-link {
  color: var(--muted);
  text-decoration: none;
}

.lang-link:hover {
  color: var(--brand);
}

.lang-link.is-active {
  color: var(--ink);
  font-weight: 700;
}

.lang-sep {
  opacity: 0.45;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--brand), #1ea88a);
  box-shadow: 0 0 0 4px rgba(15, 107, 87, 0.12);
}

.site-footer {
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero {
  text-align: center;
  padding: 88px 0 56px;
  animation: rise 0.7s ease both;
}

.brand-hero {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 10vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--brand-deep);
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 4.8vw, 2.6rem);
  line-height: 1.15;
  margin: 18px 0 16px;
  font-weight: 600;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 34rem;
  margin: 0 auto 28px;
}

.lead.left { margin-left: 0; }

.hero-actions { display: flex; justify-content: center; gap: 12px; }

.flow {
  padding: 8px 0 72px;
  animation: rise 0.8s ease 0.08s both;
}

.section-title {
  font-family: var(--display);
  font-size: 1.5rem;
  margin: 0 0 18px;
}

.flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  counter-reset: step;
}

.flow-steps li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  counter-increment: step;
  position: relative;
}

.flow-steps li::before {
  content: counter(step);
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.flow-steps strong,
.flow-steps span { display: block; }
.flow-steps span { color: var(--muted); margin-top: 6px; font-size: 0.95rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: #dff0e9;
  color: var(--brand-deep);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(228, 87, 46, 0.28);
}

.btn-primary:hover { background: #d24720; }

.btn-secondary { background: #e7f2ed; color: var(--brand-deep); }
.btn-danger { background: #fde8e6; color: var(--no); }
.btn-large { padding: 14px 22px; font-size: 1rem; }
.btn-small { padding: 8px 12px; font-size: 0.92rem; }
.full-width { width: 100%; }

.page { padding: 40px 0 72px; animation: rise 0.55s ease both; }
.narrow { max-width: 680px; margin: 0 auto; }

.create-page {
  max-width: 980px;
  margin: 0 auto;
  padding-top: 28px;
  padding-bottom: 48px;
}

.create-header h1 { margin-bottom: 6px; }
.create-header .muted { margin: 0 0 18px; }

.create-form { margin: 0; }

.create-top {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.create-note { margin: 0; }

.schedule-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.schedule-candidates,
.schedule-calendar {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.schedule-panel-head .field-label { margin-bottom: 4px; }
.schedule-panel-head .hint { margin-bottom: 8px; }

.schedule-candidates .candidates-input {
  flex: 1;
  min-height: 280px;
  height: 100%;
  margin: 0;
}

.schedule-candidates .empty-hint {
  margin: 8px 0 0;
}

.schedule-calendar .time-row {
  margin: 0 0 10px;
}

.schedule-calendar .calendar {
  flex: 1;
}

.create-actions {
  margin-top: 4px;
}

h1, h2 { font-family: var(--display); font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; margin: 8px 0 14px; }
h2 { font-size: 1.35rem; margin: 0 0 14px; }

.eyebrow {
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin: 0;
}

.muted { color: var(--muted); }

.field { margin: 20px 0; }
.field.compact { margin: 0 0 16px; }
.field label, .field-label { display: block; font-weight: 700; margin-bottom: 8px; }
.hint { margin: 0 0 12px; color: var(--muted); font-size: 0.92rem; }
.hint.is-error { color: var(--no); font-weight: 600; }

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mode-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}
.mode-option input { position: absolute; opacity: 0; pointer-events: none; width: 0; }
.mode-option.is-active,
.mode-option:has(input:checked) {
  border-color: var(--brand);
  background: #e5f5ef;
  color: var(--brand-deep);
}

.candidates-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.45;
  min-height: 10rem;
  resize: vertical;
  white-space: pre;
}

.time-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.time-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
}

.time-toggle input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--brand);
}

.time-label-input {
  width: 8.5rem;
  padding: 10px 12px;
  font-variant-numeric: tabular-nums;
}

.time-label-input:disabled {
  opacity: 0.45;
}

.calendar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar-weekdays span {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  padding-bottom: 4px;
}
.cal-day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 12px;
  background: #f3faf7;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.cal-day.is-empty { background: transparent; cursor: default; }
.cal-day.is-today { box-shadow: inset 0 0 0 2px rgba(15, 107, 87, 0.35); }
.cal-day.is-past { color: #8aa198; }
.cal-day.is-selected {
  background: var(--brand);
  color: #fff;
  transform: scale(1.04);
}
.cal-day:not(.is-empty):hover { background: #d8eee5; }
.cal-day.is-selected:hover { background: var(--brand-deep); }
.cal-day.is-flash {
  background: #fff4c8;
  border-color: #e2c76a;
  color: var(--ink);
}

.selected-slots { margin-top: 14px; }
.slot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.slot-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.slot-label { font-weight: 700; min-width: 6.5rem; }
.slot-chip .slot-time-input {
  width: auto;
  flex: 1;
  min-width: 5.5rem;
  max-width: 10rem;
  padding: 8px 10px;
  font-variant-numeric: tabular-nums;
}
.btn-tiny { padding: 6px 10px; font-size: 0.85rem; white-space: nowrap; }

.more-options {
  margin: 8px 0 20px;
  color: var(--muted);
}
.more-options summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 8px;
}

.name-line { margin: 0 0 14px; }
.choice-mark { font-size: 1.15rem; line-height: 1; }
.choice-text { font-size: 0.82rem; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(15, 107, 87, 0.28);
  border-color: var(--brand);
}

textarea { resize: vertical; }

.date-row { display: flex; gap: 8px; margin-bottom: 8px; }
.remove-date {
  width: 44px;
  border: 0;
  border-radius: 12px;
  background: #e7f0eb;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--muted);
}

.flash {
  margin: 20px 0 0;
  padding: 12px 16px;
  border-radius: 12px;
  animation: rise 0.35s ease both;
}
.flash.success { background: #e5f7ef; color: #17663b; }
.flash.alert { background: #ffe8e4; color: #9f2d27; }

.poll-header { margin-bottom: 20px; }

.creator-banner,
.share-panel,
.panel,
.result-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}

.creator-banner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #e8f7f1, #fff7f2);
}

.creator-banner p { margin: 4px 0 0; color: var(--muted); }

.share-panel label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.share-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.share-hint { min-height: 1.4em; margin: 8px 0 0; }
.share-actions { margin-top: 10px; }

.inline-form { display: flex; gap: 10px; }
.inline-form input { flex: 1; }

.vote-list { display: grid; gap: 12px; margin-bottom: 18px; }

.vote-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f4faf7;
  border-radius: 14px;
  border: 1px solid #d9ebe3;
}

.vote-date span { display: block; font-size: 0.9rem; }

.vote-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.choice {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice.is-selected {
  border-color: var(--brand);
  background: #e5f5ef;
  color: var(--brand-deep);
  transform: translateY(-1px);
}

.edit-link-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 12px 10px;
  border-bottom: 1px solid #e4efe9;
  text-align: center;
  white-space: nowrap;
}
th:first-child, td:first-child { text-align: left; }

.vote-cell { font-size: 1.2rem; font-weight: 700; }
.status-available { color: var(--ok); }
.status-maybe { color: var(--maybe); }
.status-unavailable { color: var(--no); }

.result-table tr.is-best td { background: #e8f7f1; }
.best-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}

.result-row.is-best { border-color: #9fcebf; background: #eefaf5; }
.result-meta { display: flex; justify-content: space-between; gap: 16px; }
.bar { height: 10px; background: #dceee7; border-radius: 99px; margin-top: 12px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--brand), #1ea88a); border-radius: 99px; }

.text-link { display: inline-block; margin-top: 8px; color: var(--brand); font-weight: 700; }
.text-link:hover { text-decoration: underline; }

.manage-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin: 6px 0; }

.status-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}
.status-pill.open { background: #e5f5ef; color: var(--brand-deep); }
.status-pill.closed { background: #fde8e6; color: var(--no); }

/* —— Poll show (compact, one screen) —— */
body.is-poll-page .site-header { border-bottom-color: transparent; }
body.is-poll-page .header-inner { height: 52px; }
body.is-poll-page .flash { margin: 8px 0 0; padding: 8px 12px; font-size: 0.9rem; }

.poll-page {
  padding: 8px 0 20px;
  max-width: 100%;
}

.poll-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.poll-top h1 {
  font-size: clamp(1.2rem, 3.5vw, 1.55rem);
  margin: 0;
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.25;
}

.poll-desc {
  margin: 2px 0 0;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.poll-desc p {
  margin: 0 0 0.4em;
}

.poll-desc p:last-child {
  margin-bottom: 0;
}

.poll-top-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.poll-page .share-hint {
  min-height: 0;
  margin: 0 0 8px;
  font-size: 0.85rem;
}

.matrix-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

.matrix-wrap {
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.matrix-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.matrix-table th,
.matrix-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #e8f0ec;
  border-right: 1px solid #eef4f1;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}

.matrix-table thead th {
  background: #f3faf7;
  font-weight: 700;
  color: var(--brand-deep);
  position: sticky;
  top: 0;
  z-index: 2;
}

.matrix-table .col-slot {
  text-align: left;
  font-weight: 700;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  min-width: 8.5rem;
}

.matrix-table thead .col-slot {
  background: #f3faf7;
  z-index: 3;
}

.matrix-table .col-count {
  min-width: 2rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.matrix-table .col-person {
  min-width: 2.8rem;
  max-width: 5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8rem;
}

.matrix-table .count-ok { color: var(--ok); }
.matrix-table .count-maybe { color: var(--maybe); }
.matrix-table .count-no { color: #98a29e; }

.matrix-table .vote-cell {
  font-size: 1.05rem;
  font-weight: 700;
}

.matrix-table .status-available { color: #1a9f5c; }
.matrix-table .status-maybe { color: #b0b7b3; }
.matrix-table .status-unavailable { color: #c5cbc8; }
.matrix-table .status-empty { color: #d5ddd9; }

.matrix-table tr.is-best > th,
.matrix-table tr.is-best > td,
.matrix-table th.is-best,
.matrix-table td.is-best {
  background: #e7f8ef;
}

.matrix-table tr.is-best > .col-slot,
.matrix-table thead th.col-slot.is-best {
  background: #d8f3e5;
  box-shadow: inset 3px 0 0 var(--ok);
}

.matrix-table td.is-best {
  background: #e7f8ef;
}

.best-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--ok);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.matrix-table.is-vertical .col-person {
  text-align: left;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  min-width: 5.5rem;
  max-width: 8rem;
}

.matrix-table.is-vertical thead .col-person {
  background: #f3faf7;
  z-index: 3;
}

.matrix-table.is-vertical .col-slot {
  position: static;
  min-width: 5.5rem;
  max-width: 7.5rem;
  white-space: normal;
  line-height: 1.25;
  font-size: 0.78rem;
  text-align: center;
}

.matrix-table.is-vertical .best-badge {
  display: block;
  margin: 4px auto 0;
  width: fit-content;
}

.matrix-table.is-vertical .summary-row th,
.matrix-table.is-vertical .summary-row td {
  background: #f7fbf9;
  border-bottom-color: #dce8e2;
}

.matrix-table.is-vertical .summary-row .is-best {
  background: #e7f8ef;
}

.matrix-table.is-vertical tbody .col-person {
  background: #fff;
}

.vote-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.vote-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.vote-toolbar input {
  padding: 9px 12px;
}

.symbol-vote-list {
  display: grid;
  gap: 4px;
}

.symbol-vote-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 5px 8px;
  border-radius: 8px;
  background: #f7fbf9;
}

.symbol-vote-slot {
  font-weight: 700;
  font-size: 0.9rem;
}

.symbol-choices {
  display: flex;
  gap: 6px;
}

.symbol-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 2px solid #d5e4dd;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  color: #7a8a84;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.symbol-btn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
}

/* Optical size match: ○ and × relative to △ */
.vote-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-weight: 700;
}

.vote-mark-available { font-size: 1.15em; transform: scale(3); }
.vote-mark-maybe {
  font-size: 1.15em;
  color: inherit;
}
.vote-mark-unavailable { font-size: 1.15em; transform: scale(3); }
.vote-mark-empty { font-size: 1em; font-weight: 500; }

.triangle-mark {
  display: block;
  width: 1.05em;
  height: 1.05em;
  overflow: visible;
}

.symbol-btn .vote-mark { font-size: 0.72rem; }
.symbol-btn .vote-mark-maybe { font-size: 1.05rem; }
.matrix-table .vote-mark,
.matrix-table .col-count .vote-mark { font-size: 0.65rem; }
.matrix-table .vote-mark-maybe { font-size: 0.95rem; }

.symbol-btn.is-selected {
  transform: scale(1.05);
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.symbol-btn.symbol-available.is-selected {
  background: #1a9f5c;
  border-color: #1a9f5c;
}

.symbol-btn.symbol-maybe.is-selected {
  background: #9aa4a0;
  border-color: #9aa4a0;
}

.symbol-btn.symbol-unavailable.is-selected {
  background: #b8c0bc;
  border-color: #b8c0bc;
}

.btn-vote {
  min-width: 96px;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 0.95rem;
}

.closed-note { margin: 8px 0; }

.recent-polls {
  margin: 0 auto 48px;
  max-width: 680px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise 0.7s ease 0.05s both;
}

.recent-polls .section-title { margin-bottom: 6px; }
.recent-polls-note { margin: 0 0 14px; font-size: 0.9rem; }

.recent-poll-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.recent-poll-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.recent-poll-link {
  font-weight: 700;
  color: var(--brand-deep);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-poll-link:hover { text-decoration: underline; }
.recent-poll-meta { font-size: 0.85rem; white-space: nowrap; }

.recent-poll-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #eef4f1;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.recent-poll-remove:hover {
  background: #fde8e6;
  color: var(--no);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Responsive: tablet —— */
@media (max-width: 900px) {
  .flow-steps { grid-template-columns: 1fr 1fr; }
  .schedule-builder {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .schedule-calendar { order: 1; }
  .schedule-candidates { order: 2; }
  .schedule-candidates .candidates-input {
    min-height: 160px;
    max-height: 220px;
  }
}

/* —— Responsive: phone —— */
@media (max-width: 700px) {
  .container { width: min(100% - 20px, 960px); }

  .header-inner {
    height: 56px;
    gap: 8px;
  }

  .brand {
    font-size: 1.15rem;
    gap: 8px;
    min-width: 0;
  }

  .brand-mark {
    width: 12px;
    height: 12px;
    box-shadow: 0 0 0 3px rgba(15, 107, 87, 0.12);
  }

  .header-actions {
    gap: 8px;
  }

  .lang-switch {
    font-size: 0.75rem;
    gap: 4px;
  }

  .header-actions .btn-small {
    padding: 7px 10px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .hero {
    padding: 40px 0 28px;
  }

  .brand-hero {
    font-size: clamp(2.2rem, 14vw, 3.4rem);
  }

  .hero h1 {
    font-size: clamp(1.35rem, 6.5vw, 1.85rem);
    margin: 14px 0 12px;
  }

  .lead {
    font-size: 0.98rem;
    margin-bottom: 20px;
  }

  .hero-actions .btn-large {
    width: 100%;
    max-width: 22rem;
  }

  .flow {
    padding-bottom: 40px;
  }

  .flow-steps {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .flow-steps li {
    padding: 14px;
  }

  .recent-polls {
    margin-bottom: 28px;
    padding: 14px;
  }

  .recent-poll-list li {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "link remove"
      "meta remove";
    gap: 4px 8px;
    padding: 10px 12px;
  }

  .recent-poll-link { grid-area: link; }
  .recent-poll-meta {
    grid-area: meta;
    font-size: 0.8rem;
  }
  .recent-poll-remove { grid-area: remove; align-self: center; }

  .page { padding: 20px 0 40px; }
  .create-page {
    padding-top: 12px;
    padding-bottom: 32px;
  }
  .create-header h1 { font-size: 1.55rem; }
  .create-header .muted { margin-bottom: 12px; font-size: 0.9rem; }

  .time-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .time-label-input { width: 100%; }

  .calendar {
    padding: 10px;
    border-radius: 14px;
  }
  .calendar-weekdays,
  .calendar-grid { gap: 4px; }
  .calendar-weekdays span { font-size: 0.7rem; }
  .cal-day {
    border-radius: 10px;
    font-size: 0.9rem;
    min-height: 40px;
  }

  .candidates-input {
    font-size: 16px;
    min-height: 9rem;
  }

  input,
  textarea,
  select {
    font-size: 16px;
  }

  .create-actions .btn-large {
    padding: 14px 16px;
  }

  /* Poll page */
  body.is-poll-page .header-inner { height: 48px; }
  body.is-poll-page .header-actions .btn-small { display: none; }

  .poll-page { padding: 6px 0 28px; }

  .poll-top {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 8px;
  }

  .poll-top h1 {
    font-size: 1.2rem;
  }

  .poll-top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .poll-top-actions .btn {
    flex: 1 1 calc(50% - 4px);
    width: auto;
    min-height: 40px;
  }

  .poll-top-actions .btn:only-child,
  .poll-top-actions .btn:last-child:nth-child(odd) {
    flex-basis: 100%;
  }

  .matrix-section {
    border-radius: 10px;
    margin-bottom: 8px;
  }

  .matrix-table {
    font-size: 0.8rem;
  }

  .matrix-table th,
  .matrix-table td {
    padding: 6px 6px;
  }

  .matrix-table .col-slot {
    min-width: 5.8rem;
    font-size: 0.75rem;
    max-width: 7.5rem;
    white-space: normal;
    line-height: 1.25;
  }

  .matrix-table .col-person {
    min-width: 2.4rem;
    max-width: 4rem;
    font-size: 0.72rem;
  }

  .matrix-table.is-vertical .col-person {
    min-width: 4.5rem;
    max-width: 6rem;
  }

  .matrix-table.is-vertical .col-slot {
    min-width: 4.5rem;
    max-width: 5.5rem;
    font-size: 0.7rem;
  }

  .vote-section {
    padding: 8px;
    border-radius: 10px;
  }

  .vote-toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .vote-toolbar input {
    min-height: 44px;
    font-size: 1rem;
  }

  .btn-vote {
    width: 100%;
    min-height: 44px;
    min-width: 0;
  }

  .symbol-vote-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 8px 10px;
  }

  .symbol-vote-slot {
    font-size: 0.88rem;
  }

  .symbol-choices {
    justify-content: space-between;
    gap: 8px;
  }

  .symbol-btn {
    flex: 1;
    width: auto;
    height: 44px;
    max-width: none;
  }

  .creator-banner { flex-direction: column; align-items: stretch; }
  .share-row { grid-template-columns: 1fr auto; }
  .inline-form { flex-direction: column; }
  .vote-choices { grid-template-columns: 1fr; }
  .result-meta { flex-direction: column; gap: 2px; }

  /* ○ was optically oversized vs △ / × on small screens */
  .vote-mark-available { transform: scale(2.1); }
}

/* —— Responsive: small phone —— */
@media (max-width: 380px) {
  .container { width: min(100% - 16px, 960px); }

  .lang-switch .lang-sep { display: none; }
  .lang-switch {
    flex-direction: column;
    gap: 0;
    line-height: 1.2;
  }

  .header-actions .btn-small {
    padding: 6px 8px;
    font-size: 0.78rem;
  }

  .brand span:last-child {
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .poll-top-actions {
    grid-template-columns: 1fr;
  }

  .poll-top-actions .btn {
    flex-basis: 100%;
  }
}
