:root {
  color-scheme: light;
  --paper: #f7f1e3;
  --paper-deep: #eae0c8;
  --surface: #fffdf7;
  --ink: #15251f;
  --muted: #6f766e;
  --line: rgba(21, 37, 31, 0.12);
  --coral: #ff5d45;
  --coral-dark: #dd3e2d;
  --sun: #ffc64d;
  --mint: #b9e6cd;
  --green: #1b7457;
  --blue: #bdcff7;
  --maybe: #f1b83d;
  --white: #fffdf7;
  --shadow: 0 18px 50px rgba(54, 46, 26, 0.13);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Manrope", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 198, 77, 0.26), transparent 24rem),
    linear-gradient(180deg, #fbf6e9 0%, var(--paper) 50%, #f0e7d2 100%);
  -webkit-tap-highlight-color: transparent;
}

button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(27, 116, 87, 0.33); outline-offset: 3px; }

.ambient { position: fixed; z-index: 0; width: 15rem; height: 15rem; border-radius: 42% 58% 62% 38%; pointer-events: none; opacity: 0.4; }
.ambient-sun { top: -8rem; right: -6rem; background: var(--sun); transform: rotate(22deg); }
.ambient-mint { top: 47rem; left: -12rem; background: var(--mint); transform: rotate(-20deg); }

.app-shell { position: relative; z-index: 1; width: min(100%, 580px); min-height: 100vh; margin: 0 auto; padding: 0 18px; }
.onboarding-shell { position: relative; z-index: 1; display: grid; width: min(100%, 580px); min-height: 100vh; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px calc(24px + var(--safe-bottom)); place-content: center; }
.onboarding-language { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,253,247,0.76); backdrop-filter: blur(12px); }
.onboarding-language button { width: 39px; min-height: 32px; border: 0; border-radius: 99px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 900; cursor: pointer; }
.onboarding-language button.is-active { color: var(--surface); background: var(--ink); }
.onboarding-card { position: relative; padding: 31px 23px 21px; overflow: hidden; border: 1px solid rgba(21,37,31,0.1); border-radius: 30px; background: rgba(255,253,247,0.86); box-shadow: 0 24px 70px rgba(54,46,26,0.15); }
.onboarding-card::before { content: ""; position: absolute; top: -78px; right: -65px; width: 190px; height: 190px; border-radius: 45% 55% 63% 37%; background: rgba(255,198,77,0.35); transform: rotate(24deg); }
.onboarding-constellation { position: absolute; top: 29px; right: 27px; width: 76px; height: 60px; }
.onboarding-constellation::before, .onboarding-constellation::after { content: ""; position: absolute; height: 1px; background: rgba(21,37,31,0.23); transform-origin: left center; }
.onboarding-constellation::before { top: 17px; left: 11px; width: 47px; transform: rotate(21deg); }
.onboarding-constellation::after { top: 25px; left: 48px; width: 28px; transform: rotate(105deg); }
.onboarding-constellation i { position: absolute; z-index: 1; width: 14px; height: 14px; border: 3px solid var(--surface); border-radius: 50%; background: var(--coral); box-shadow: 0 2px 8px rgba(21,37,31,0.13); }
.onboarding-constellation i:nth-child(1) { top: 8px; left: 4px; }
.onboarding-constellation i:nth-child(2) { top: 23px; left: 47px; background: var(--green); }
.onboarding-constellation i:nth-child(3) { right: 1px; bottom: 2px; background: var(--sun); }
.onboarding-brand { position: relative; margin-bottom: 48px; }
.onboarding-card h1 { position: relative; max-width: 430px; margin: 8px 0 13px; font-family: "Unbounded", sans-serif; font-size: clamp(29px, 9vw, 43px); letter-spacing: -0.075em; line-height: 1.07; }
.onboarding-lead { max-width: 430px; margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.onboarding-steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 7px; align-items: center; margin-bottom: 22px; padding: 13px 11px; border-radius: 17px; background: #f2ecdd; }
.onboarding-steps > span { display: flex; min-width: 0; flex-direction: column; align-items: center; text-align: center; }
.onboarding-steps b { display: grid; width: 25px; height: 25px; margin-bottom: 5px; place-items: center; border-radius: 9px; color: var(--surface); background: var(--ink); font-family: "Unbounded", sans-serif; font-size: 10px; }
.onboarding-steps span:nth-of-type(2) b { color: var(--ink); background: var(--sun); transform: rotate(3deg); }
.onboarding-steps span:nth-of-type(3) b { background: var(--green); transform: rotate(-3deg); }
.onboarding-steps small { color: var(--muted); font-size: 9px; font-weight: 800; line-height: 1.25; }
.onboarding-steps > i { color: #a5a69e; font-style: normal; font-size: 13px; }
.onboarding-primary { margin-bottom: 8px; }
.secondary-button { width: 100%; min-height: 47px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.support-project-link { display: flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; margin: 7px auto 0; border: 0; color: var(--muted); background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.support-project-link span:first-child { color: #d69200; font-size: 14px; }
.onboarding-footnote { max-width: 390px; margin: 16px auto 0; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: max(18px, env(safe-area-inset-top)) 0 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Unbounded", sans-serif; font-size: 16px; font-weight: 700; letter-spacing: -0.05em; }
.brand-mark { position: relative; display: inline-flex; width: 27px; height: 23px; }
.brand-mark i { position: absolute; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--coral); }
.brand-mark i:nth-child(1) { left: 0; }
.brand-mark i:nth-child(2) { left: 8px; bottom: 8px; background: var(--sun); }
.brand-mark i:nth-child(3) { right: 0; background: var(--green); }

.top-actions { display: flex; align-items: center; gap: 7px; }
.timezone-button, .icon-button { min-height: 41px; border: 1px solid var(--line); background: rgba(255, 253, 247, 0.72); backdrop-filter: blur(12px); cursor: pointer; }
.timezone-button { display: flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 99px; color: var(--muted); font-size: 12px; }
.timezone-button span { color: var(--coral-dark); font-size: 16px; }
.timezone-button b { max-width: 82px; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.icon-button { display: grid; width: 41px; padding: 0; place-items: center; border-radius: 50%; }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.group-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 15px 0 18px; }
.eyebrow { margin: 0 0 5px; color: var(--coral-dark); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.group-head h1 { margin: 0; font-family: "Unbounded", sans-serif; font-size: clamp(30px, 9vw, 42px); letter-spacing: -0.07em; line-height: 1; }
.people, .attendee-row { display: flex; align-items: center; padding-left: 10px; }
.avatar { display: grid; width: 35px; height: 35px; margin-left: -10px; place-items: center; overflow: hidden; border: 2px solid var(--paper); border-radius: 50%; color: var(--ink); background: var(--avatar, var(--mint)); font-size: 11px; font-weight: 800; box-shadow: 0 2px 8px rgba(21, 37, 31, 0.1); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-more { color: var(--white); background: var(--ink); }

.response-card { position: relative; display: grid; grid-template-columns: 45px 1fr; gap: 12px; align-items: center; min-height: 70px; margin-bottom: 24px; padding: 12px 14px; overflow: hidden; border: 1px solid rgba(27, 116, 87, 0.13); border-radius: 19px; background: rgba(255, 253, 247, 0.76); box-shadow: 0 10px 30px rgba(77, 55, 27, 0.07); }
.response-orbit { position: relative; width: 43px; height: 43px; border: 1px dashed rgba(27, 116, 87, 0.4); border-radius: 50%; animation: orbit 14s linear infinite; }
.response-orbit span { position: absolute; width: 13px; height: 13px; border: 2px solid var(--surface); border-radius: 50%; background: var(--coral); }
.response-orbit span:nth-child(1) { top: -2px; left: 3px; }
.response-orbit span:nth-child(2) { right: -2px; bottom: 8px; background: var(--sun); }
.response-orbit span:nth-child(3) { bottom: -2px; left: 5px; background: var(--green); }
.response-copy { display: flex; min-width: 0; flex-direction: column; }
.response-copy strong { font-size: 14px; letter-spacing: -0.02em; }
.response-copy span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.response-progress { position: absolute; right: 14px; bottom: 13px; left: 71px; height: 3px; overflow: hidden; border-radius: 99px; background: #e7e1d3; }
.response-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #55b98d); transition: width 380ms ease; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 0; font-family: "Unbounded", sans-serif; font-size: 17px; letter-spacing: -0.05em; line-height: 1.25; }
.best-heading-row { margin-bottom: 11px; }
.duration-button { flex: 0 0 auto; min-height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: rgba(255, 253, 247, 0.7); font-size: 11px; cursor: pointer; }
.duration-button b { color: var(--ink); }
.duration-button .duration-chevron { margin-left: 5px; }
.best-list { display: grid; gap: 8px; }
.best-card { position: relative; display: grid; grid-template-columns: 49px 1fr auto; gap: 12px; align-items: center; width: 100%; min-height: 86px; padding: 13px; overflow: hidden; border: 0; border-radius: 21px; color: var(--white); background: var(--ink); text-align: left; box-shadow: 0 15px 32px rgba(21, 37, 31, 0.2); cursor: pointer; transition: transform 160ms ease, box-shadow 160ms ease; }
.best-card::after { content: ""; position: absolute; right: -28px; bottom: -45px; width: 105px; height: 105px; border: 1px solid rgba(255,255,255,0.13); border-radius: 50%; }
.best-card:hover { transform: translateY(-1px); box-shadow: 0 18px 38px rgba(21, 37, 31, 0.25); }
.best-card:active { transform: scale(0.99); }
.best-card-secondary { min-height: 73px; color: var(--ink); background: rgba(255, 253, 247, 0.78); border: 1px solid var(--line); box-shadow: none; }
.best-card-secondary:hover { transform: translateY(-1px); border-color: rgba(21,37,31,0.13); box-shadow: 0 8px 22px rgba(21,37,31,0.075); }
.best-card-secondary::after { border-color: rgba(21,37,31,0.07); }
.best-date { display: flex; width: 49px; height: 58px; flex-direction: column; align-items: center; justify-content: center; border-radius: 15px; color: var(--ink); background: var(--sun); transform: rotate(-2deg); }
.best-card-secondary .best-date { height: 48px; background: var(--mint); }
.best-date span { font-size: 10px; font-weight: 900; text-transform: uppercase; }
.best-date strong { font-family: "Unbounded", sans-serif; font-size: 19px; letter-spacing: -0.08em; }
.best-copy { min-width: 0; }
.best-copy strong { display: block; margin-bottom: 3px; overflow: hidden; font-family: "Unbounded", sans-serif; font-size: 13px; letter-spacing: -0.045em; text-overflow: ellipsis; white-space: nowrap; }
.best-copy span { display: block; overflow: hidden; color: #c5cec8; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.best-card-secondary .best-copy span { color: var(--muted); }
.best-badge { z-index: 1; padding: 6px 8px; border-radius: 99px; color: var(--ink); background: var(--white); font-size: 11px; font-weight: 800; white-space: nowrap; }
.best-card-secondary .best-badge { background: #e3eddf; }
.night-badge { color: #fff; background: #455663; }
.empty-best { display: flex; min-height: 132px; flex-direction: column; align-items: center; justify-content: center; padding: 20px; border: 1px dashed rgba(21,37,31,0.2); border-radius: 20px; text-align: center; background: rgba(255,253,247,0.45); }
.empty-best > span { color: var(--coral); font-size: 22px; }
.empty-best strong { margin: 4px 0; font-size: 14px; }
.empty-best p { max-width: 300px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }

.view-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 0 0 18px; padding: 3px; border: 1px solid var(--line); border-radius: 14px; background: rgba(234, 225, 203, 0.66); }
.view-tab { position: relative; min-height: 42px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 800; cursor: pointer; transition: 180ms ease; }
.view-tab.is-active { color: var(--ink); background: var(--surface); box-shadow: 0 5px 15px rgba(52, 45, 28, 0.1); }
.unsaved-dot { display: inline-block; width: 6px; height: 6px; margin-left: 3px; border-radius: 50%; background: var(--coral); vertical-align: 1px; }

.workspace { margin-top: 18px; }
.is-mine-view .workspace { margin-top: 4px; }
.day-strip { display: grid; grid-template-columns: repeat(7, minmax(45px, 1fr)); gap: 5px; margin: 0 -3px 14px; overflow-x: auto; padding: 3px; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day-button { position: relative; display: flex; min-width: 45px; min-height: 59px; flex-direction: column; align-items: center; justify-content: center; padding: 5px 2px; border: 1px solid transparent; border-radius: 14px; color: var(--muted); background: transparent; cursor: pointer; transition: 150ms ease; }
.day-button span { font-size: 10px; font-weight: 800; text-transform: uppercase; }
.day-button strong { margin: 2px 0; font-family: "Unbounded", sans-serif; font-size: 15px; letter-spacing: -0.06em; }
.day-button small { min-height: 11px; color: var(--green); font-size: 9px; font-weight: 800; }
.day-button.is-weekend span { color: var(--coral-dark); }
.day-button.is-active { border-color: var(--ink); color: var(--surface); background: var(--ink); box-shadow: 0 8px 18px rgba(21,37,31,0.18); transform: translateY(-2px); }
.day-button.is-active span, .day-button.is-active small { color: var(--sun); }
.day-button.is-today::after { content: ""; position: absolute; top: 5px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--coral); }

.calendar-heading { margin: 0 1px 12px; }
.calendar-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.heat-legend { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 9px; }
.heat-legend i { width: 7px; height: 16px; border-radius: 99px; background: var(--green); opacity: 0.25; }
.heat-legend i:nth-child(2) { opacity: 0.55; }
.heat-legend i:nth-child(3) { opacity: 1; }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.editor-shell { margin-bottom: 9px; }
.save-state { display: flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 78px; color: var(--green); font-size: 10px; font-weight: 800; transition: opacity 160ms ease; }
.save-state:not(.is-saving):not(.is-error) { opacity: 0; }
.save-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.save-state.is-saving { color: var(--muted); }
.save-state.is-saving i { border: 1px solid var(--muted); border-top-color: transparent; background: transparent; animation: spin 0.8s linear infinite; }
.save-state.is-error { color: var(--coral-dark); }
.save-state.is-error i { background: var(--coral); }

.brush-switch { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(21,37,31,0.08); }
.brush-button { width: auto; min-height: 39px; border: 1px solid transparent; border-radius: 11px; color: var(--muted); background: #eee8da; font-size: 11px; font-weight: 800; cursor: pointer; }
.brush-button i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border: 2px solid var(--coral); border-radius: 50%; vertical-align: -1px; }
.brush-button[data-brush="maybe"] i { border-color: var(--maybe); }
.brush-button.is-active { color: var(--surface); border-color: var(--ink); background: var(--ink); box-shadow: none; }
.brush-button[data-brush="sure"].is-active i { background: var(--coral); }
.brush-button[data-brush="maybe"].is-active i { background: var(--maybe); }

.editor-context { position: sticky; z-index: 8; top: max(7px, env(safe-area-inset-top)); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; margin: 0; padding: 10px; border: 1px solid rgba(21,37,31,0.11); border-radius: 16px; background: rgba(255,253,247,0.92); box-shadow: 0 8px 24px rgba(45,40,26,0.1); backdrop-filter: blur(16px); }
.editor-context-copy { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.editor-context-copy strong { max-width: 100%; overflow: hidden; font-family: "Unbounded", sans-serif; font-size: 13px; letter-spacing: -0.04em; text-overflow: ellipsis; white-space: nowrap; }
.editor-context-copy span { margin-top: 2px; color: var(--green); font-size: 10px; font-weight: 800; }

.day-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 7px 2px 0; }
.day-actions button { display: inline-flex; min-height: 35px; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.day-actions button span:first-child { color: var(--coral-dark); font-size: 13px; }
.day-actions button:hover { color: var(--ink); background: rgba(255,253,247,0.62); }
.day-actions button:active { background: #e9e2d3; transform: scale(0.97); }
.day-actions button:disabled { opacity: 0.35; background: transparent; cursor: default; transform: none; }
.day-actions .day-action-reset { width: 35px; flex: 0 0 35px; justify-content: center; margin-left: 2px; padding: 0; color: var(--coral-dark); background: rgba(255,93,69,0.08); }
.day-action-reset svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.period-carousel { position: relative; }
.slot-panel.is-entering-next { animation: period-enter-next 240ms cubic-bezier(.2,.8,.2,1); }
.slot-panel.is-entering-previous { animation: period-enter-previous 240ms cubic-bezier(.2,.8,.2,1); }
.period-navigation { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 5px; align-items: stretch; margin: 0 0 9px; }
.period-arrow { display: grid; min-height: 53px; place-items: center; padding: 0; border: 1px solid rgba(21,37,31,0.09); border-radius: 14px; color: var(--ink); background: rgba(255,253,247,0.68); cursor: pointer; transition: color 140ms ease, background 140ms ease, border-color 140ms ease, transform 90ms ease; }
.period-arrow svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.period-arrow:active:not(:disabled) { color: var(--white); background: var(--ink); transform: scale(0.96); }
.period-arrow:disabled { opacity: 0.28; cursor: default; }
.period-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 0; padding: 3px; border-radius: 14px; background: rgba(234,225,203,0.68); }
.period-switch button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 6px; min-height: 47px; padding: 6px 8px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; text-align: left; cursor: pointer; transition: 150ms ease; }
.period-switch button > span { grid-row: 1 / 3; align-self: center; color: var(--coral); font-size: 15px; }
.period-switch button b { align-self: end; color: var(--ink); font-size: 12px; }
.period-switch button small { align-self: start; font-size: 9px; }
.period-switch button.is-active { color: #bfc8c2; background: var(--ink); box-shadow: none; }
.period-switch button.is-active b { color: var(--white); }
.period-switch button.is-active > span { color: var(--sun); }

.slot-panel { padding: 14px 12px 12px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,253,247,0.72); box-shadow: 0 10px 28px rgba(58,47,25,0.055); }
.is-mine-view .slot-panel { padding-top: 11px; box-shadow: none; }
.is-mine-view .slot-panel-head { display: none; }
.slot-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 11px; }
.slot-panel-head > div { display: flex; min-width: 0; flex-direction: column; }
.slot-panel-head strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.slot-panel-head span:not(.selection-summary) { color: var(--muted); font-size: 10px; }
.selection-summary { flex: 0 0 auto; padding: 6px 8px; border-radius: 99px; color: var(--green); background: #ddf0e4; font-size: 10px; font-weight: 800; }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; touch-action: pan-y pinch-zoom; user-select: none; -webkit-touch-callout: none; }
.slot-grid.is-painting { touch-action: none; }
.time-slot { position: relative; display: flex; min-width: 0; min-height: 45px; align-items: center; justify-content: center; gap: 5px; padding: 0 5px; overflow: hidden; border: 1px solid rgba(21,37,31,0.1); border-radius: 12px; color: var(--ink); background: #f0ebdf; font-size: 12px; font-weight: 800; cursor: pointer; transition: transform 90ms ease, background 140ms ease, border-color 140ms ease; }
.slot-grid.is-painting .time-slot { transition-duration: 60ms; }
.slot-grid.is-painting .time-slot.is-sure, .slot-grid.is-painting .time-slot.is-maybe { transform: scale(0.96); }
.time-slot small { color: var(--muted); font-size: 9px; font-weight: 600; }
.time-slot:active { transform: scale(0.94); }
.time-slot.is-sure { color: #fff; border-color: var(--coral); background: var(--coral); box-shadow: inset 0 -6px 14px rgba(150,38,23,0.15); }
.time-slot.is-sure small { color: #ffe1da; }
.time-slot.is-maybe { color: #513b0a; border-color: #e5aa2e; background: #f7ca65; }
.time-slot.is-maybe small { color: #765a18; }
.time-slot.is-heat { flex-direction: column; gap: 0; color: var(--heat-text, var(--ink)); border-color: transparent; background: color-mix(in srgb, var(--green) calc(var(--heat) * 100%), #ece7da); }
.time-slot.is-heat span { font-size: 11px; }
.time-slot.is-heat small { color: inherit; opacity: 0.72; }
.time-slot.is-all { box-shadow: inset 0 0 0 2px rgba(255,253,247,0.78), 0 0 0 1px var(--green); }
.time-slot.is-past { opacity: 0.32; cursor: not-allowed; }

.editor-tip { display: grid; grid-template-columns: 24px 1fr auto; gap: 7px; align-items: center; margin-top: 6px; padding: 7px 8px; border-radius: 11px; background: rgba(185,230,205,0.28); }
.editor-tip > span { display: grid; width: 24px; height: 24px; place-items: center; color: var(--green); font-size: 14px; }
.editor-tip p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.35; }
.editor-tip p strong { color: var(--ink); font-size: 10px; }
.editor-tip button { width: 27px; height: 27px; border: 0; color: var(--muted); background: transparent; font-size: 17px; cursor: pointer; }
.bottom-space { height: calc(34px + var(--safe-bottom)); }

.sheet { width: min(100%, 580px); max-width: none; max-height: 92vh; margin: auto auto 0; padding: 0; overflow: visible; border: 0; background: transparent; }
.sheet::backdrop, .mini-dialog::backdrop { background: rgba(15,28,23,0.5); backdrop-filter: blur(4px); }
.sheet[open] { animation: sheet-in 280ms cubic-bezier(.2,.8,.2,1); }
.sheet-card { position: relative; max-height: 92vh; padding: 30px 20px calc(20px + var(--safe-bottom)); overflow-y: auto; border-radius: 28px 28px 0 0; background: var(--surface); box-shadow: 0 -18px 55px rgba(10,20,16,0.24); }
.sheet-handle { position: absolute; z-index: 3; top: 0; left: 50%; width: 64px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; transform: translateX(-50%); }
.sheet-handle::before { content: ""; position: absolute; top: 9px; left: 50%; width: 35px; height: 4px; border-radius: 99px; background: #d8d4ca; transform: translateX(-50%); transition: width 140ms ease, background 140ms ease; }
.sheet-handle:hover::before, .sheet-handle:focus-visible::before { width: 43px; background: #aaa99f; }
.sheet-close { position: absolute; z-index: 2; top: 18px; right: 17px; width: 35px; height: 35px; border: 0; border-radius: 50%; color: var(--muted); background: #f0ece2; font-size: 22px; cursor: pointer; }
.sheet-icon { display: grid; width: 45px; height: 45px; margin-bottom: 17px; place-items: center; border-radius: 14px; color: var(--coral-dark); background: #ffe1d6; font-size: 21px; transform: rotate(-5deg); }
.timezone-icon { color: var(--green); background: #dcefe3; }
.sheet-card h2 { margin: 0 45px 7px 0; font-family: "Unbounded", sans-serif; font-size: 20px; letter-spacing: -0.06em; line-height: 1.3; }
.sheet-subtitle { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.timezone-list { display: grid; gap: 6px; margin-bottom: 16px; }
.timezone-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border-radius: 12px; background: #f2eee3; font-size: 11px; }
.timezone-row span { color: var(--muted); }
.timezone-row strong { font-family: "Unbounded", sans-serif; font-size: 11px; }
.member-groups { display: grid; gap: 10px; margin-bottom: 18px; }
.member-group { padding: 11px; border: 1px solid var(--line); border-radius: 14px; }
.member-group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; font-size: 11px; font-weight: 800; }
.member-group-head span { color: var(--muted); font-weight: 600; }
.member-list { display: flex; flex-wrap: wrap; gap: 6px; }
.member-pill { display: flex; align-items: center; gap: 5px; padding: 4px 8px 4px 4px; border-radius: 99px; background: #f3efe5; font-size: 10px; font-weight: 700; }
.member-pill .avatar { width: 22px; height: 22px; margin: 0; border-width: 1px; font-size: 8px; }
.member-group-sure .member-group-head { color: var(--green); }
.member-group-maybe .member-group-head { color: #a8770f; }
.member-group-away .member-group-head { color: var(--coral-dark); }
.field-label { display: block; margin: 0 0 7px; font-size: 11px; font-weight: 800; }
.title-field { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; background: #f7f3e9; }
.title-field span { color: var(--coral-dark); }
.title-field input { width: 100%; min-height: 49px; padding: 0; border: 0; color: var(--ink); background: transparent; font-size: 13px; font-weight: 700; outline: 0; }
.title-field input::placeholder { color: #98998f; font-weight: 600; opacity: 1; }
.reminder-setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: -2px 0 13px; padding: 9px 9px 9px 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(247,243,233,0.72); transition: border-color 160ms ease, background 160ms ease; }
.reminder-setting.is-enabled { border-color: rgba(27,116,87,0.24); background: rgba(185,230,205,0.22); }
.reminder-setting-copy { display: flex; min-width: 0; align-items: center; gap: 8px; }
.reminder-setting-copy > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.reminder-setting-copy strong { font-size: 11px; }
.reminder-setting-copy small { margin-top: 1px; color: var(--muted); font-size: 9px; line-height: 1.25; }
.reminder-icon { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 9px; color: var(--green); background: #dcefe3; font-size: 15px; }
.reminder-controls { display: flex; align-items: center; gap: 5px; }
.reminder-controls select { width: 73px; min-height: 34px; padding: 0 5px; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: #ebe6db; font-size: 10px; font-weight: 800; opacity: 0.48; transition: opacity 160ms ease, color 160ms ease, background 160ms ease; }
.reminder-controls select:enabled { color: var(--ink); background: var(--surface); opacity: 1; cursor: pointer; }
.toggle-control { position: relative; display: grid; width: 44px; height: 40px; place-items: center; cursor: pointer; }
.toggle-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-control i { position: relative; width: 38px; height: 22px; border-radius: 99px; background: #d8d3c8; box-shadow: inset 0 0 0 1px rgba(21,37,31,0.08); transition: background 180ms ease; }
.toggle-control i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 2px 5px rgba(21,37,31,0.2); transition: transform 180ms cubic-bezier(.2,.8,.2,1); }
.toggle-control input:checked + i { background: var(--green); }
.toggle-control input:checked + i::after { transform: translateX(16px); }
.toggle-control input:focus-visible + i { outline: 3px solid rgba(27,116,87,0.3); outline-offset: 2px; }
.primary-button { display: inline-flex; width: 100%; min-height: 52px; align-items: center; justify-content: center; gap: 18px; padding: 0 18px; border: 0; border-radius: 15px; color: #fff; background: var(--coral); font-size: 13px; font-weight: 800; box-shadow: 0 10px 22px rgba(222,61,43,0.24); cursor: pointer; }
.primary-button:hover { background: var(--coral-dark); }
.primary-button:disabled { background: #d8d4c9; box-shadow: none; cursor: default; }
.primary-button .button-arrow { font-size: 18px; }
.timezone-sheet-card select { width: 100%; min-height: 48px; margin-bottom: 10px; padding: 0 12px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: #f7f3e9; font-size: 12px; }
.language-setting { margin: 18px 0 15px; }
.language-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 7px; padding: 4px; border: 1px solid var(--line); border-radius: 15px; background: #f0eadc; }
.language-switch button { min-height: 42px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.language-switch button.is-active { color: var(--ink); background: var(--surface); box-shadow: 0 5px 14px rgba(52, 45, 28, 0.1); }
.language-switch button:active { transform: scale(0.98); }
.timezone-preview { min-height: 42px; margin-bottom: 14px; padding: 10px 11px; border-radius: 12px; color: var(--muted); background: #edf3ed; font-size: 11px; line-height: 1.45; }
.timezone-preview strong { color: var(--ink); }
.support-card { display: grid; width: 100%; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; margin-top: 10px; padding: 10px 11px; border: 1px solid rgba(27, 116, 87, 0.16); border-radius: 15px; color: var(--ink); background: rgba(185, 230, 205, 0.3); text-align: left; cursor: pointer; transition: transform 150ms ease, background 150ms ease; }
.support-card:active { background: rgba(185, 230, 205, 0.54); transform: scale(0.985); }
.support-card-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--surface); background: var(--green); font-family: "Unbounded", sans-serif; font-size: 16px; font-weight: 700; transform: rotate(-3deg); }
.support-card-copy { display: flex; min-width: 0; flex-direction: column; }
.support-card-copy strong { font-size: 12px; }
.support-card-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.support-card-arrow { color: var(--green); font-size: 18px; }
.stars-card { border-color: rgba(214,146,0,0.2); background: rgba(255,198,77,0.18); }
.stars-card:active { background: rgba(255,198,77,0.31); }
.stars-card-icon { color: #4e3907; background: var(--sun); transform: rotate(4deg); }
.stars-card .support-card-arrow { color: #a56f00; }

.mini-dialog { width: min(calc(100% - 36px), 380px); padding: 0; border: 0; border-radius: 21px; background: transparent; }
.mini-dialog-card { padding: 17px; border-radius: 21px; background: var(--surface); box-shadow: var(--shadow); }
.mini-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mini-dialog-head strong { font-family: "Unbounded", sans-serif; font-size: 14px; letter-spacing: -0.04em; }
.mini-dialog-head button { width: 30px; height: 30px; border: 0; border-radius: 50%; color: var(--muted); background: #f0ece2; font-size: 18px; cursor: pointer; }
.mini-dialog-copy { margin: -2px 0 13px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.stars-dialog-card { overflow: hidden; }
.stars-illustration { position: relative; display: grid; width: 76px; height: 67px; margin: -3px auto 8px; place-items: center; }
.stars-illustration span { z-index: 1; color: var(--sun); font-size: 55px; filter: drop-shadow(0 8px 12px rgba(182,121,0,0.23)); transform: rotate(-7deg); }
.stars-illustration i { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
.stars-illustration i:nth-of-type(1) { top: 6px; right: 2px; }
.stars-illustration i:nth-of-type(2) { bottom: 7px; left: 2px; background: var(--green); }
.stars-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.stars-options button { display: flex; min-height: 60px; flex-direction: column; align-items: flex-start; justify-content: center; padding: 8px 11px; border: 1px solid rgba(197,135,0,0.2); border-radius: 14px; background: #fff5d8; cursor: pointer; }
.stars-options button span { color: #6c4b00; font-family: "Unbounded", sans-serif; font-size: 13px; }
.stars-options button small { margin-top: 3px; color: #8b7953; font-size: 9px; }
.stars-options button:active { transform: scale(0.97); }
.stars-note { margin: 11px 0 0; color: var(--muted); font-size: 9px; text-align: center; }
.duration-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.duration-options button { min-height: 45px; border: 1px solid var(--line); border-radius: 12px; background: #f6f2e8; font-size: 12px; font-weight: 800; cursor: pointer; }
.duration-options button.is-active { color: #fff; border-color: var(--ink); background: var(--ink); }

.toast { position: fixed; z-index: 30; top: max(14px, env(safe-area-inset-top)); left: 50%; max-width: calc(100% - 36px); padding: 11px 15px; border-radius: 99px; color: var(--white); background: var(--ink); box-shadow: var(--shadow); font-size: 12px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, -16px); transition: 220ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.is-hidden { display: none !important; }

@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(35%); } to { opacity: 1; transform: translateY(0); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes period-enter-next { from { opacity: 0.42; transform: translate3d(34px, 0, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes period-enter-previous { from { opacity: 0.42; transform: translate3d(-34px, 0, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
.group-head, .response-card, .best-section, .view-switch { animation: rise-in 420ms both; }
.response-card { animation-delay: 50ms; }
.best-section { animation-delay: 100ms; }
.view-switch { animation-delay: 150ms; }

@media (min-width: 620px) {
  body { padding: 18px 0; }
  .app-shell { min-height: calc(100vh - 36px); border: 1px solid rgba(21,37,31,0.09); border-radius: 28px; background: rgba(247,241,227,0.58); box-shadow: 0 24px 80px rgba(52,44,25,0.15); }
  .onboarding-shell { min-height: calc(100vh - 36px); }
  .sheet { margin-bottom: 18px; }
  .sheet-card { border-radius: 28px; }
}

@media (max-width: 390px) {
  .app-shell { padding: 0 12px; }
  .day-strip { grid-template-columns: repeat(7, minmax(43px, 1fr)); gap: 3px; }
  .day-button { min-width: 43px; }
  .onboarding-shell { padding-right: 12px; padding-left: 12px; }
  .onboarding-card { padding-right: 18px; padding-left: 18px; }
  .onboarding-steps { gap: 4px; padding-right: 7px; padding-left: 7px; }
  .slot-grid { gap: 5px; }
  .time-slot { min-height: 44px; }
  .best-card { grid-template-columns: 46px 1fr auto; gap: 9px; }
  .best-date { width: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
