* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; overflow-y: scroll; }
body { min-height: 100%; font-family: var(--font-family); background: var(--color-background); color: var(--color-text); }
body.poll-view { height: 100%; overflow: hidden; }

.navbar { background: var(--color-navbar-bg); color: var(--color-navbar-text); padding: 0.9rem 0 0.8rem 0; }
.navbar-inner { max-width: var(--layout-max-width); margin: 0 auto; padding: 0 2rem; display: flex; justify-content: space-between; align-items: center; }
.navbar a { color: var(--color-navbar-text); text-decoration: none; }
.brand-group { display: flex; align-items: center; gap: 0.75rem; padding-left: 1rem; }
.brand { font-weight: bold; font-size: var(--font-size-lg); }
.theme-toggle { background: none; border: none; cursor: pointer; color: var(--color-navbar-text); padding: 0.25rem; display: flex; align-items: center; justify-content: center; opacity: 0.8; transition: opacity 0.2s; }
.theme-toggle:hover { opacity: 1; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.nav-right { display: flex; align-items: center; gap: 1rem; padding-right: 1rem; }
.user-info { background: rgba(255,255,255,0.2); padding: 0.25rem 0.75rem; border-radius: 1rem; font-size: var(--font-size-sm); }

.container { max-width: var(--layout-max-width); margin: 0 auto; padding: 0 2rem; }
body.poll-view .container { padding: 1rem 2rem; height: calc(100vh - 52px); display: flex; flex-direction: column; overflow: hidden; }
body:not(.poll-view) .container { padding-top: 2rem; padding-bottom: 2rem; }
.btn { padding: 0.5rem 1rem; border: none; border-radius: var(--layout-border-radius-sm); cursor: pointer; font-size: var(--font-size-base); }
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-hover); }

.hero { text-align: center; padding: 3rem 2rem 2rem; }
.hero h1 { font-size: var(--font-size-xl); margin-bottom: 1rem; }
.hero p { font-size: var(--font-size-lg); color: var(--color-text-muted); margin-bottom: 2rem; }

.my-polls-section { margin-top: 2rem; }
.my-polls-section h2 { margin-bottom: 1rem; }
.polls-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 800px) { .polls-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .polls-grid { grid-template-columns: 1fr; } }
.poll-card { display: block; background: var(--color-surface); padding: 1.25rem; border-radius: var(--layout-border-radius); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--color-text); transition: box-shadow 0.2s, transform 0.2s; }
.poll-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.poll-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; color: var(--color-primary); }
.participant-count { font-size: var(--font-size-sm); color: var(--color-text-muted); }
.no-polls, .loading { color: var(--color-text-light); font-style: italic; grid-column: 1 / -1; }

.dashboard { max-width: 800px; margin: 0 auto; }
.dashboard h1 { margin-bottom: 2rem; }
.create-poll, .polls-list { background: var(--color-surface); padding: var(--layout-spacing); border-radius: var(--layout-border-radius); margin-bottom: var(--layout-spacing); box-shadow: var(--shadow-sm); }
.create-poll h2, .polls-list h2 { margin-bottom: var(--layout-spacing-sm); font-size: var(--font-size-lg); }
.create-poll input, .create-poll textarea { width: 100%; padding: 0.75rem; margin-bottom: 1rem; border: 1px solid var(--color-border); border-radius: var(--layout-border-radius-sm); font-size: var(--font-size-base); }
.create-poll textarea { resize: vertical; min-height: 80px; }
.date-picker-section { margin-bottom: 1rem; }
.date-picker-section label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.date-picker-section .calendar-nav { margin-bottom: 0.5rem; }
.date-picker-section .calendar { margin-bottom: 0.5rem; }
.date-picker-section .hint { margin-top: 0; margin-bottom: 1rem; }
.polls-list ul { list-style: none; }
.polls-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--color-border-light); }
.polls-list li:last-child { border-bottom: none; }
.polls-list a { color: var(--color-primary); text-decoration: none; }

.poll-header { background: var(--color-surface); padding: var(--layout-spacing); border-radius: var(--layout-border-radius); margin-bottom: var(--layout-spacing); box-shadow: var(--shadow-sm); }
.poll-title-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.poll-title-row h1 { margin: 0; }
.poll-desc { color: var(--color-text-muted); margin-bottom: 1rem; white-space: pre-line; }
.participants-section { margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.join-section { margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.join-section input { padding: 0.5rem; border: 1px solid var(--color-border); border-radius: var(--layout-border-radius-sm); background: var(--color-input-bg); color: var(--color-text); }
.participants-label { font-weight: 600; color: var(--color-text-muted); }
.participants-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.participant { background: var(--color-primary-light); padding: 0.25rem 0.75rem; border-radius: 1rem; font-size: var(--font-size-sm); }
.participant.current-user { background: var(--color-primary); color: white; }
.no-participants { color: var(--color-text-light); font-style: italic; }
.share-link { display: flex; gap: 0.5rem; }
.share-link input { flex: 1; padding: 0.5rem; border: 1px solid var(--color-border); border-radius: var(--layout-border-radius-sm); background: var(--color-input-bg); color: var(--color-text); }
.status-message { display: none; padding: 0.75rem 1rem; border-radius: var(--layout-border-radius-sm); margin-bottom: var(--layout-spacing); text-align: center; }
.status-message.success { background: var(--color-success-bg); color: var(--color-success); }
.status-message.error { background: var(--color-error-bg); color: var(--color-error); }

.poll-page { display: flex; flex-direction: column; height: calc(100vh - 60px); overflow: hidden; }
.poll-header { flex-shrink: 0; }
.poll-content { display: grid; grid-template-columns: 1fr 320px 200px; grid-template-rows: auto 1fr; gap: var(--layout-spacing); flex: 1; min-height: 0; margin-bottom: 1rem; }
.poll-content > .panel { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.results-panel { grid-row: span 2; }
.time-panel { grid-row: span 2; }
.notes-panel { grid-column: 2; padding: var(--layout-spacing-sm); }
/* Tablet breakpoint */
@media (max-width: 1000px) {
  .poll-content {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    overflow-y: auto;
  }
  .poll-content > .panel { max-height: 450px; }
  .results-panel { grid-column: 1; grid-row: 1 / 3; }
  .calendar-panel { grid-column: 2; grid-row: 1; }
  .time-panel { grid-column: 2; grid-row: 2; }
  .notes-panel { display: none; }
}

.panel { background: var(--color-surface); padding: var(--layout-spacing); border-radius: var(--layout-border-radius); box-shadow: var(--shadow-sm); }
.panel h2 { margin-bottom: var(--layout-spacing-sm); font-size: 1.1rem; flex-shrink: 0; }
.panel-header + * { margin-top: 0; }

.calendar-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.calendar-nav button { background: none; border: 1px solid var(--color-border); padding: 0.25rem 0.5rem; cursor: pointer; border-radius: var(--layout-border-radius-sm); }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendar .day-header { text-align: center; font-size: var(--font-size-xs); font-weight: 600; color: var(--color-text-muted); padding: 0.25rem; }
.calendar .day { text-align: center; padding: 0.5rem; cursor: pointer; border-radius: var(--layout-border-radius-sm); font-size: var(--font-size-sm); user-select: none; }
.calendar .day:hover { background: var(--color-primary-light); }
.calendar .day.has-avail { background: var(--color-primary-light); }
.calendar .day.heat-1 { background: var(--heat-1); }
.calendar .day.heat-2 { background: var(--heat-2); }
.calendar .day.heat-3 { background: var(--heat-3); }
.calendar .day.heat-4 { background: var(--heat-4); }
.calendar .day.best-slot { font-weight: 700; }
.calendar .day.selected { box-shadow: inset 0 0 0 2px var(--color-primary); }
.calendar .day.selected.has-avail { background: var(--color-primary-light); }
.calendar .day.other-month { color: #ccc; }
.hint { font-size: var(--font-size-xs); color: var(--color-text-light); margin-top: 0.5rem; display: flex; justify-content: space-between; align-items: center; }
.hint-centered { justify-content: center; }
.hint-centered .hint-help { display: none; }
.hint-help { width: 14px; height: 14px; border-radius: 50%; color: var(--color-text-muted); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; cursor: help; position: relative; padding-top: 1px; }
.hint-help path {
  fill: #8888;
}
.hint-help:hover::after { content: attr(title); position: fixed; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); padding: 0.5rem; border-radius: var(--layout-border-radius-sm); font-size: var(--font-size-xs); white-space: pre; z-index: 1000; transform: translateY(-100%) translateY(-8px); box-shadow: var(--shadow-md); }
.calendar .day.preview { background: var(--color-primary-light); outline: 2px dashed var(--color-primary); }
.calendar .day.preview-remove { background: var(--color-error-bg); outline: 2px dashed var(--color-error); }
.reset-btn { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--color-text-muted); vertical-align: middle; margin-left: 0.5rem; }
.reset-btn:hover { color: var(--color-error); }
.calendar-actions { margin-top: var(--layout-spacing-sm); display: flex; flex-direction: column; gap: 0.5rem; }
.calendar-actions .guest-info { display: flex; gap: 0.5rem; }
.calendar-actions .guest-info input { padding: 0.5rem; border: 1px solid var(--color-border); border-radius: var(--layout-border-radius-sm); flex: 1; background: var(--color-input-bg); color: var(--color-text); }

.time-grid { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; min-height: 200px; padding-right: 6px; }
.time-slot { padding: 0.35rem; border: 1px solid var(--color-border); border-radius: var(--layout-border-radius-sm); cursor: pointer; text-align: center; font-size: var(--font-size-xs); user-select: none; position: relative; }
.time-slot:hover:not(.disabled) { background: var(--color-primary-light); }
.time-slot.has-avail { background: var(--color-primary-light); }
.time-slot.heat-1 { background: var(--heat-1); }
.time-slot.heat-2 { background: var(--heat-2); }
.time-slot.heat-3 { background: var(--heat-3); }
.time-slot.heat-4 { background: var(--heat-4); }
.time-slot.best-slot { font-weight: 700; }
.time-arrow { position: absolute; left: 0px; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 10px solid var(--color-primary); }
.time-slot.selected { box-shadow: inset 0 0 0 2px var(--color-primary); }
.time-slot.selected.has-avail { background: var(--color-primary-light); }
.time-slot.preview { background: var(--color-primary-light); outline: 2px dashed var(--color-primary); }
.time-slot.preview-remove { background: var(--color-error-bg); outline: 2px dashed var(--color-error); }
.time-slot.disabled, .calendar .day.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.calendar .day.not-allowed { color: #bbb; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.results-panel { padding: var(--layout-spacing-sm); }
.results-panel #results-table { flex: 1; display: block; overflow-y: auto; width: 100%; padding-right: 6px; }
.results-panel thead { position: sticky; top: 0; background: var(--color-surface); z-index: 1; }
.calendar-panel .calendar { flex-shrink: 0; }
.calendar-panel .calendar-actions { flex-shrink: 0; }
#results-table { width: 100%; border-collapse: collapse; }
#results-table th, #results-table td { padding: 0.5rem; text-align: left; border-bottom: 1px solid var(--color-border-light); font-size: var(--font-size-sm); }
#results-table th:first-child, #results-table td:first-child { white-space: nowrap; width: 1%; }
#results-table th:nth-child(2), #results-table td:nth-child(2) { white-space: nowrap; width: 1%; padding-left: 1rem; padding-right: 1rem; text-align: center; }
#results-table th { font-weight: 600; background: var(--color-background); }
#results-table tr:hover { background: var(--color-background); }
#results-table tr.best-slot td:first-child { font-weight: 700; }
.attendee-list { display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; padding-bottom: 2px; }
.attendee { display: inline-flex; align-items: center; gap: 4px; background: var(--color-primary-light); padding: 2px 8px; border-radius: 12px; font-size: var(--font-size-xs); cursor: pointer; flex-shrink: 0; }
.attendee:hover { background: var(--color-primary); color: white; }
.attendee.filtered { background: var(--color-primary); color: white; }
.attendee img { width: 20px; height: 20px; border-radius: 50%; }
.conflict { color: var(--color-error); }
.count { font-weight: 600; color: var(--color-success); }

.submit-section { margin-top: var(--layout-spacing); background: var(--color-surface); padding: var(--layout-spacing); border-radius: var(--layout-border-radius); box-shadow: var(--shadow-sm); display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.guest-info { display: flex; gap: 0.5rem; flex: 1; }
.guest-info input { padding: 0.5rem; border: 1px solid var(--color-border); border-radius: var(--layout-border-radius-sm); flex: 1; background: var(--color-input-bg); color: var(--color-text); }
#submit-btn { padding: 0.75rem 2rem; min-width: 180px; }
#submit-btn.success { background: var(--color-success); }
#submit-btn .btn-text { display: inline; }
#submit-btn .btn-check { display: none; }
#submit-btn.success .btn-text { display: none; }
#submit-btn.success .btn-check { display: inline; }

.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--layout-spacing-sm); }
.panel-header h2 { margin-bottom: 0; }
.view-switch { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; user-select: none; }
.view-switch input { display: none; }
.switch-slider { width: 36px; height: 20px; background: var(--color-border); border-radius: 10px; position: relative; transition: background 0.2s; }
.switch-slider::after { content: ''; position: absolute; width: 16px; height: 16px; background: white; border-radius: 50%; top: 2px; left: 2px; transition: transform 0.2s; }
.view-switch input:checked + .switch-slider { background: var(--color-primary); }
.view-switch input:checked + .switch-slider::after { transform: translateX(16px); }
.switch-label { font-size: var(--font-size-sm); color: var(--color-text-muted); }

.calendar .day.has-availability { position: relative; }
.calendar .day.has-availability::after { content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; background: var(--color-success); border-radius: 50%; }
.calendar .day.highlight-flash { animation: flash-day 0.6s ease-out; }
.calendar .day.selected.highlight-flash { animation: flash-day-selected 0.6s ease-out; }
.time-slot.highlight-flash { animation: flash-time 0.6s ease-out; }
.time-slot.selected.highlight-flash { animation: flash-time-selected 0.6s ease-out; }
@keyframes flash-day { 0%, 100% { box-shadow: none; } 50% { box-shadow: inset 0 0 0 3px var(--color-primary); } }
@keyframes flash-day-selected { 0%, 100% { box-shadow: inset 0 0 0 2px var(--color-primary); } 50% { box-shadow: inset 0 0 0 2px var(--color-primary), 0 0 0 4px var(--color-primary-light); } }
@keyframes flash-time { 0%, 100% { box-shadow: none; } 50% { box-shadow: inset 0 0 0 3px var(--color-primary); } }
@keyframes flash-time-selected { 0%, 100% { box-shadow: inset 0 0 0 2px var(--color-primary); } 50% { box-shadow: inset 0 0 0 2px var(--color-primary), 0 0 0 4px var(--color-primary-light); } }

#results-table tbody tr { cursor: pointer; }
#results-table tbody tr:hover { background: var(--color-primary-light); }

.note-input { width: 100%; padding: 0.5rem; border: 1px solid var(--color-border); border-radius: var(--layout-border-radius-sm); font-size: var(--font-size-sm); margin-bottom: 0.5rem; background: var(--color-input-bg); color: var(--color-text); }
.note-input::placeholder { color: var(--color-text-light); }

.notes-panel h2 { margin-bottom: 0.5rem; }
.notes-pane-content { flex: 1; overflow-y: auto; font-size: var(--font-size-sm); word-break: break-word; overflow-wrap: break-word; }
.notes-pane-empty { color: var(--color-text-light); font-style: italic; }
.notes-pane-content .note-item { padding: 0.5rem; margin-bottom: 0.5rem; background: var(--color-background); border-radius: var(--layout-border-radius-sm); border-left: 3px solid var(--color-primary); }
.notes-pane-content .note-item:last-child { margin-bottom: 0; }
.notes-pane-content .note-author { font-weight: 700; color: var(--color-text); }
.note-indicator { margin-left: 0.25rem; }

.checkbox-option { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; cursor: pointer; user-select: none; }
.checkbox-option input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; margin: 0; cursor: pointer; }
.checkbox-option span { line-height: 1.2; }

.btn-small { padding: 0.3rem 0.75rem; font-size: var(--font-size-sm); }

.poll-title-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.poll-title-row h1 { margin: 0; flex-shrink: 0; }
.poll-title-row .share-link { flex: 1; max-width: 400px; display: flex; gap: 0.5rem; }
.poll-title-row .share-link input { flex: 1; padding: 0.35rem 0.5rem; font-size: var(--font-size-sm); border: 1px solid var(--color-border); border-radius: var(--layout-border-radius-sm); background: var(--color-background); color: var(--color-text-muted); }
.participants-section .join-section { margin: 0; margin-left: auto; }
.admin-section { display: flex; gap: 0.5rem; margin-left: auto; }
.btn-danger { background: var(--color-error); color: white; }
.btn-danger:hover { background: #b91c1c; }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: var(--color-surface); padding: var(--layout-spacing); border-radius: var(--layout-border-radius); box-shadow: var(--shadow-md); max-width: 400px; width: 90%; }
.modal h3 { margin: 0 0 0.5rem; }
.modal-subtitle { color: var(--color-text-muted); font-size: var(--font-size-sm); margin-bottom: 1rem; }
.modal-form { margin-bottom: 1rem; }
.modal-form input { width: 100%; padding: 0.75rem; border: 1px solid var(--color-border); border-radius: var(--layout-border-radius-sm); font-size: var(--font-size-base); background: var(--color-input-bg); color: var(--color-text); }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
.modal-actions .btn { min-width: 80px; text-align: center; }

/* ========== MOBILE STYLES ========== */
@media (max-width: 768px) {
  /* Navbar */
  .navbar { padding: 0.6rem 0; }
  .navbar-inner { padding: 0 1rem; }
  .brand-group { padding-left: 0; gap: 0.5rem; }
  .brand { font-size: 1rem; }
  .theme-toggle { padding: 0.2rem; }
  .theme-toggle svg { width: 16px; height: 16px; }
  .nav-right { gap: 0.75rem; padding-right: 0; font-size: var(--font-size-sm); }
  .user-info { padding: 0.2rem 0.5rem; font-size: var(--font-size-xs); }

  /* Container */
  .container { padding: 0 1rem; }
  body.poll-view .container { padding: 0.75rem 1rem; height: auto; min-height: calc(100vh - 44px); overflow: visible; }
  body:not(.poll-view) .container { padding: 1rem; }
  body.poll-view { height: auto; overflow: auto; }

  /* Hero */
  .hero { padding: 2rem 1rem 1.5rem; }
  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 1rem; margin-bottom: 1.5rem; }

  /* Polls grid */
  .polls-grid { grid-template-columns: 1fr; }
  .poll-card { padding: 1rem; }

  /* Dashboard */
  .dashboard { padding: 0; }
  .dashboard h1 { font-size: 1.5rem; margin-bottom: 1rem; }
  .create-poll { padding: var(--layout-spacing-sm); }

  /* Poll page layout */
  .poll-page { height: auto; min-height: calc(100vh - 44px); }
  .poll-header { padding: var(--layout-spacing-sm); margin-bottom: 0.75rem; }
  .poll-header h1 { font-size: 1.25rem; }
  .poll-desc { font-size: var(--font-size-sm); margin-bottom: 0.75rem; }

  /* Participants section */
  .participants-section { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .participants-section .join-section { margin-left: 0; width: 100%; }
  .participants-section .join-section #join-btn { width: 100%; }
  .admin-section { margin-left: 0; width: 100%; }
  .admin-section .btn { flex: 1; }
  .participants-list { max-width: 100%; }

  /* Poll content grid - reorder for mobile workflow */
  .poll-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: visible;
    margin-bottom: 0.75rem;
  }
  .poll-content > .panel { max-height: none; order: 0; }
  .calendar-panel { order: 1; }
  .time-panel { order: 2; }
  .results-panel { order: 3; }
  .notes-panel { order: 4; }

  /* Panels */
  .panel { padding: var(--layout-spacing-sm); }
  .panel h2 { font-size: 1rem; margin-bottom: 0.5rem; }
  .panel-header { margin-bottom: 0.5rem; }
  .panel-header h2 { font-size: 1rem; }

  /* Calendar - larger touch targets */
  .calendar { gap: 3px; }
  .calendar .day { padding: 0.6rem 0.25rem; font-size: var(--font-size-sm); min-height: 38px; }
  .calendar .day-header { font-size: 0.7rem; padding: 0.25rem 0; }
  .calendar-nav { margin-bottom: 0.75rem; }
  .calendar-nav button { padding: 0.4rem 0.75rem; }

  /* Time grid - better for touch */
  .time-panel { max-height: 350px; }
  .time-grid { max-height: 280px; min-height: 150px; padding-right: 4px; }
  .time-slot { padding: 0.5rem 0.35rem; font-size: var(--font-size-sm); min-height: 36px; }

  /* Results panel */
  .results-panel { max-height: 400px; }
  .results-panel #results-table { max-height: 340px; }
  #results-table th, #results-table td { padding: 0.4rem; font-size: var(--font-size-xs); }
  #results-table th:nth-child(2), #results-table td:nth-child(2) { padding-left: 0.5rem; padding-right: 0.5rem; }
  .attendee { padding: 2px 6px; font-size: 0.65rem; }
  .attendee img { width: 16px; height: 16px; }

  /* Notes panel */
  .notes-panel { max-height: 200px; }
  .notes-pane-content { font-size: var(--font-size-xs); }

  /* Hints */
  .hint { font-size: 0.65rem; margin-top: 0.4rem; }
  .hint-help { display: none; }

  /* Calendar actions */
  .calendar-actions { margin-top: 0.75rem; gap: 0.5rem; }
  .note-input { padding: 0.6rem; font-size: var(--font-size-sm); }

  /* Buttons */
  #submit-btn { width: 100%; padding: 0.85rem 1rem; font-size: var(--font-size-base); min-width: auto; }
  .btn { padding: 0.6rem 1rem; }
  .btn-small { padding: 0.4rem 0.75rem; }
  .reset-btn { font-size: 1rem; margin-left: 0.25rem; }

  /* View switch */
  .view-switch { gap: 0.35rem; }
  .switch-slider { width: 32px; height: 18px; }
  .switch-slider::after { width: 14px; height: 14px; }
  .view-switch input:checked + .switch-slider::after { transform: translateX(14px); }
  .switch-label { font-size: var(--font-size-xs); }

  /* Modal */
  .modal { padding: var(--layout-spacing-sm); width: 95%; }
  .modal h3 { font-size: 1.1rem; }
  .modal-subtitle { font-size: var(--font-size-xs); }
  .modal-form input { padding: 0.65rem; }
  .modal-actions { flex-direction: column; gap: 0.5rem; }
  .modal-actions .btn { width: 100%; min-width: auto; padding: 0.75rem; }

  /* Share link in title row */
  .poll-title-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .poll-title-row .share-link { max-width: 100%; width: 100%; }
  .poll-title-row .share-link input { font-size: var(--font-size-xs); }
}
