/* 빨간 날 shell (2026-11-30 mockup audit): header family switcher, sheets, icons.
   Mockups: artifacts/redesign-20261129/project/SheetFamily, WSheetFamily, Main, WMain. */

.tm-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tm-iconbtn { display: grid; place-items: center; width: var(--tm-touch); height: var(--tm-touch); flex: none; padding: 0; border: 0; border-radius: var(--tm-r-sm); background: none; color: var(--tm-ink); }
.tm-iconbtn:hover { background: var(--tm-surface-2); }
.tm-iconbtn .tm-ico { width: 22px; height: 22px; }
.btn-soft { --bs-btn-color: var(--tm-ink); --bs-btn-bg: var(--tm-bg); --bs-btn-border-color: var(--tm-bg); --bs-btn-hover-color: var(--tm-ink); --bs-btn-hover-bg: var(--tm-surface-2); --bs-btn-hover-border-color: var(--tm-surface-2); --bs-btn-active-bg: var(--tm-surface-3); --bs-btn-active-border-color: var(--tm-surface-3); font-weight: 700; }

/* Family switcher: "우리 집 ▾" next to the brand. */
.family-switcher { min-width: 0; }
.family-trigger { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: var(--tm-touch); padding: 0 6px; border: 0; border-radius: var(--tm-r-sm); background: none; color: var(--tm-ink); font-size: 1.125rem; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; }
.family-trigger:hover { background: var(--tm-surface-2); }
.family-trigger-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Sheets: a bottom sheet on phones, a centred dialog (or a flyout) on wider screens. */
.tm-sheet { inset: auto 0 0; width: 100%; max-width: none; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0; border-radius: var(--tm-r-lg) var(--tm-r-lg) 0 0; background: var(--tm-surface); color: var(--tm-ink); box-shadow: var(--tm-e-3); overflow-y: auto; }
.tm-sheet-panel { display: flex; flex-direction: column; gap: var(--tm-s-4); padding: 6px 20px calc(30px + env(safe-area-inset-bottom, 0px)); }
.tm-sheet::backdrop { background: var(--tm-scrim); }
.tm-sheet-grab { flex: none; width: 40px; height: 4px; margin: 4px auto 0; border-radius: var(--tm-r-full); background: var(--tm-line); }
.tm-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--tm-s-2); min-height: var(--tm-touch); }
.tm-sheet-head h2 { margin: 0; font-size: 1.3125rem; font-weight: 800; letter-spacing: -0.03em; }

.family-menu-list { display: flex; flex-direction: column; }
.family-menu-list a { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 4px; border-top: 1px solid var(--tm-line); color: var(--tm-ink); font-size: 1.0625rem; font-weight: 600; text-decoration: none; }
.family-menu-list a:first-child { border-top: 0; }
.family-menu-list a:hover { background: var(--tm-surface-2); }
.family-menu-list a.is-current { font-weight: 800; }
.family-menu-dday { flex: none; min-width: 3.5rem; white-space: nowrap; color: var(--tm-ink-2); font: 800 1.5rem/1 var(--tm-font-num); text-align: center; }
.family-menu-dday.is-red { color: var(--tm-red); }
.family-menu-name { min-width: 0; overflow-wrap: anywhere; }
.family-menu-name small { display: block; color: var(--tm-ink-2); font-size: var(--tm-text-caption); font-weight: 500; }
.family-menu-count { margin-left: auto; color: var(--tm-ink-2); font-size: .9375rem; font-weight: 500; white-space: nowrap; }
.family-menu-check { margin-left: 8px; color: var(--tm-red); }
.family-menu-actions { display: flex; gap: 10px; }
.family-menu-actions > .btn { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 6px; }
.family-join-link { display: grid; gap: var(--tm-s-2); }
.family-join-link label { font-weight: 700; }

/* Calendar home (Main / WMain / Empty). */
.calendar-leaf-link { display: block; border-radius: var(--tm-r-leaf); color: inherit; text-decoration: none; }
.calendar-leaf-link:hover { color: inherit; }
.calendar-leaf-link:hover .calendar-leaf { box-shadow: var(--tm-leaf-shadow), var(--tm-e-1); }
.calendar-leaf-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--tm-s-3); margin-block-start: var(--tm-s-4); }
.leaf-seals { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.leaf-seal { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 2px solid var(--tm-red); border-radius: var(--tm-r-xs); background: var(--tm-surface); color: var(--tm-red); font-size: .75rem; font-weight: 800; line-height: 1.05; }
.leaf-seal .tm-ico { width: 18px; height: 18px; stroke-width: 2.2; }
.leaf-seal.is-me { background: var(--tm-red); color: var(--tm-on-primary); }
.leaf-seal.is-pending { border-style: dashed; border-color: var(--tm-line-strong); color: var(--tm-ink-2); }
.leaf-seal-more { border-color: var(--tm-line); color: var(--tm-ink-2); }
.red-day-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.calendar-leaf-empty { min-height: 22.5rem; align-content: start; }
.calendar-leaf-empty .calendar-leaf-day { color: var(--tm-surface-2); }
.calendar-leaf-empty .calendar-leaf-title { margin: var(--tm-s-2) 0 0; font-weight: 800; }
.calendar-leaf-empty .calendar-leaf-subtitle { margin: 0; }
.red-day-empty-actions { display: grid; gap: 10px; margin-block-start: var(--tm-s-5); }
.red-day-empty-actions > .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.red-day-list-head { display: flex; align-items: center; justify-content: space-between; gap: var(--tm-s-2); min-height: 2rem; margin-block-end: var(--tm-s-2); }
.red-day-list-head h2 { margin: 0; font-size: 1.0625rem; font-weight: 800; }
.red-day-add { min-height: var(--tm-touch); padding-inline: 10px; color: var(--tm-blue); font-weight: 700; text-decoration: none; }

/* Capsule (Capsule / CapsuleSealed / WCapsule / WCapsuleSealed / OpenDay / Opened). */
.btn-red { --bs-btn-color: var(--tm-on-primary); --bs-btn-bg: var(--tm-red); --bs-btn-border-color: var(--tm-red); --bs-btn-hover-color: var(--tm-on-primary); --bs-btn-hover-bg: var(--tm-accent-ink); --bs-btn-hover-border-color: var(--tm-accent-ink); --bs-btn-active-bg: var(--tm-accent-ink); --bs-btn-disabled-bg: var(--tm-red); --bs-btn-disabled-border-color: var(--tm-red); font-weight: 800; }
.tm-card { padding: 16px 18px; border-radius: var(--tm-r-leaf); background: var(--tm-surface); color: var(--tm-ink); }
.capsule-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--tm-s-2); min-height: var(--tm-touch); margin: 0 0 var(--tm-s-3); }
.capsule-back { display: inline-flex; align-items: center; gap: 2px; min-height: var(--tm-touch); padding: 0 8px 0 0; border: 0; background: none; color: var(--tm-ink); font-size: 1rem; font-weight: 600; text-decoration: none; }
.capsule-back:hover { color: var(--tm-ink); text-decoration: underline; }
.capsule-topbar-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.capsule-share-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.capsule-overview { display: grid; gap: var(--tm-s-4); }
.capsule-overview-main { display: grid; gap: var(--tm-s-4); min-width: 0; align-content: start; }
.capsule-overview-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.capsule-leaf-times { display: flex; gap: 10px; margin-block-start: var(--tm-s-3); padding-block-start: var(--tm-s-3); border-top: 1px solid var(--tm-line); }
.capsule-leaf-times .tm-ico { margin-top: 2px; color: var(--tm-ink-2); }
.capsule-leaf-times div { display: grid; }
.capsule-leaf-times small { color: var(--tm-ink-2); font-size: var(--tm-text-sm); }
.capsule-member-times h2, .capsule-card-head h2 { margin: 0; font-size: 1rem; font-weight: 800; }
.capsule-member-times { margin-block: 0; }
.capsule-member-times ul { margin: var(--tm-s-2) 0 0; padding: 0; list-style: none; }
.capsule-member-times li { display: flex; align-items: center; gap: 10px; min-height: 48px; border-top: 1px solid var(--tm-line); }
.capsule-member-times li:first-child { border-top: 0; }
.member-time-name { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.member-time-name small { color: var(--tm-ink-2); font-size: var(--tm-text-sm); font-weight: 500; }
.member-time-value { margin-left: auto; font: 800 1.25rem/1 var(--tm-font-num); white-space: nowrap; }
.capsule-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--tm-s-2); flex-wrap: wrap; }
.capsule-card-head b { color: var(--tm-red); font: 800 1.5rem/1 var(--tm-font-num); }
.capsule-card-head small { color: var(--tm-ink-2); font-size: var(--tm-text-sm); }
.capsule-message-seals { justify-content: flex-start; margin-top: var(--tm-s-3); }
.capsule-call-family { margin-top: var(--tm-s-2); padding-inline: 0; color: var(--tm-blue); font-weight: 700; text-decoration: none; }
.capsule-actions { display: grid; gap: 10px; }
.capsule-actions:empty { display: none; }
.capsule-actions > .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.capsule-opening { display: grid; gap: var(--tm-s-5); max-width: 32rem; margin: var(--tm-s-8) auto 0; }
.capsule-opening .capsule-opening-leaf { position: relative; margin: 0; }
.leaf-curl { position: absolute; right: 0; bottom: 0; width: 86px; height: 86px; border-bottom-right-radius: var(--tm-r-leaf); background: linear-gradient(135deg, var(--tm-surface-2) 0 49%, var(--tm-surface) 50% 100%); box-shadow: var(--tm-e-1); clip-path: polygon(100% 0, 100% 100%, 0 100%); pointer-events: none; }
.capsule-opened { display: grid; gap: var(--tm-s-4); }
.capsule-opened[hidden] { display: none; }
.capsule-opened-side .calendar-leaf { padding-block-end: var(--tm-s-4); }
.capsule-opened-main { min-width: 0; outline: 0; }
.capsule-page .own-message-view-action.btn-link { padding-inline: 0; font-weight: 700; text-decoration: none; }

/* Family (Family / WFamily / SheetMember). */
.tm-badge { display: inline-flex; align-items: center; min-height: 22px; margin-left: 6px; padding: 0 8px; border-radius: var(--tm-r-leaf); background: var(--tm-bg); color: var(--tm-ink-2); font-size: .75rem; font-weight: 700; vertical-align: middle; }
.family-head-actions { display: flex; gap: 8px; }
.family-head-actions > .btn { display: inline-flex; align-items: center; gap: 6px; }
.family-head-actions > .family-settings-entry { display: none; }
.family-clocks { display: none; }
.family-people { display: flex; flex-direction: column; margin: 0 0 var(--tm-s-5); padding: 0; border-radius: var(--tm-r-leaf); background: var(--tm-surface); list-style: none; }
.family-people:empty { display: none; }
.family-people > li + li { border-top: 1px solid var(--tm-line); }
.family-person { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 68px; padding: 10px 16px; border: 0; background: none; color: var(--tm-ink); text-align: left; }
.family-person:not(:disabled):hover { background: var(--tm-surface-2); }
.family-person:disabled { opacity: 1; cursor: default; }
.family-person-seal { width: 40px; height: 40px; }
.family-person-text { display: flex; flex-direction: column; min-width: 0; }
.family-person-text strong { font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
.family-person-self { color: var(--tm-ink-2); font-weight: 600; }
.family-person-text small, .family-person-clock small { color: var(--tm-ink-2); font-size: .8125rem; }
.family-person-text small:empty { display: none; }
.family-person-clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; white-space: nowrap; }
.family-person-clock time { font: 700 1.375rem/1 var(--tm-font-num); }
.family-people-empty { margin: 0 0 var(--tm-s-4); }
.family-birthday-book { margin-block-start: var(--tm-s-2); }
.family-settings-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; margin-bottom: var(--tm-s-4); padding: 10px 16px; border: 0; border-radius: var(--tm-r-leaf); background: var(--tm-surface); color: var(--tm-ink); text-align: left; }
.family-settings-row .tm-ico { color: var(--tm-ink-2); }
.family-settings-row span { display: flex; flex-direction: column; }
.family-settings-row small { color: var(--tm-ink-2); font-size: .8125rem; }
.tm-menu { display: flex; flex-direction: column; margin-block: var(--tm-s-2); }
.tm-menu > button, .tm-menu > a { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 4px; border: 0; border-top: 1px solid var(--tm-line); background: none; color: var(--tm-ink); font-size: 1.0625rem; font-weight: 600; text-align: left; text-decoration: none; }
.tm-menu > :first-child { border-top: 0; }
.tm-menu .tm-ico { width: 22px; height: 22px; color: var(--tm-ink-2); }
.tm-menu > .is-danger, .tm-menu > .is-danger .tm-ico { color: var(--tm-danger); }
.tm-menu > button:not(:disabled):hover { background: var(--tm-surface-2); }
.tm-menu.capsule-management-actions { margin: 0; border-top: 0; }
.tm-menu.capsule-management-actions > button { min-height: 56px; padding: 0 4px; }
.tm-menu-end { margin-left: auto; color: var(--tm-ink-2); font-size: .9375rem; font-weight: 500; }

/* Photos header (Photos / WPhotos). */
.photos-head-actions { display: flex; align-items: center; gap: 8px; }
.photos-head-actions > .btn { display: inline-flex; align-items: center; gap: 6px; }
.photos-restore-entry { background: transparent; border-color: transparent; }
.photos-restore-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Account (Account / WAccount). */
.manage-body > h1 { margin-bottom: var(--tm-s-4); }
.manage-body:has(> .account-security-links) { max-width: 36rem; margin-inline: auto; padding: 0; border: 0; background: none; }
.tm-list { display: flex; flex-direction: column; margin: 0 0 var(--tm-s-3); padding: 0; border-radius: var(--tm-r-leaf); background: var(--tm-surface); list-style: none; }
.tm-list > li + li { border-top: 1px solid var(--tm-line); }
.account-security-links.tm-list .nav-item { border-bottom: 0; }
.tm-list .nav-link { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; color: var(--tm-ink); }
.tm-list .nav-link:hover { background: var(--tm-surface-2); color: var(--tm-ink); }
.tm-list .nav-link.is-danger, .tm-list .nav-link.is-danger .tm-ico { color: var(--tm-danger); }
.tm-list .tm-ico { color: var(--tm-ink-2); }
.tm-list-text { display: flex; flex-direction: column; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tm-list-text strong { font-size: 1rem; font-weight: 700; }
.tm-list-text small { color: var(--tm-ink-2); font-size: .8125rem; }
.tm-list-end { color: var(--tm-ink-2); font-size: .875rem; white-space: nowrap; }
.tm-badge.is-on { background: var(--tm-success-soft); color: var(--tm-success); }

/* Recipient link (RecipientWait / WRecipientWait / OpenDay). */
.invite-wait { display: grid; gap: var(--tm-s-4); max-width: 26rem; margin: var(--tm-s-6) auto 0; }
.invite-wait .invite-date-leaf { position: relative; max-width: none; margin: 0; }
.invite-countdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; color: var(--tm-ink); }
.invite-countdown > div { display: flex; flex-direction: column; align-items: center; padding: 14px 8px 10px; border-radius: var(--tm-r-leaf); background: var(--tm-surface); }
.invite-countdown b { font: 800 2.25rem/1 var(--tm-font-num); }
.invite-countdown small { color: var(--tm-ink-2); font-size: .8125rem; font-weight: 600; }
.invite-wait-note { margin: 0; color: var(--tm-ink-2); font-size: var(--tm-text-sm); text-align: center; }
.invite-wait .invite-open-action { width: 100%; }

/* Letter (Compose / WCompose / GuestWrite / GuestDone). */
.letter-form fieldset { display: flex; flex-direction: column; gap: 6px; }
.letter-form label { font-size: .875rem; font-weight: 700; }
.letter-form #sender-name { margin-bottom: var(--tm-s-3); }
.letter-lined { width: 100%; min-height: 12rem; padding: 0; border: 0; background-color: transparent; background-image: repeating-linear-gradient(to bottom, transparent 0 33px, var(--tm-line) 33px 34px); color: var(--tm-ink); font-size: 1.125rem; line-height: 34px; resize: vertical; }
.letter-lined:focus { outline: 0; box-shadow: none; }
.letter-lined:focus-visible { outline: 3px solid var(--tm-focus); outline-offset: 4px; }
.letter-form .message-help { margin-top: 2px; }
.message-attachment-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: var(--tm-s-3); }
.message-attachment { position: relative; min-width: 0; padding: 0; border: 0; }
.message-attachment.is-clip { grid-column: 1 / -1; }
.message-attachment .media-preview > .field-hint { display: none; }
.message-attachment.is-photo .capsule-media { aspect-ratio: 1; width: 100%; max-height: none; margin: 0; border-radius: var(--tm-r-xs); object-fit: cover; background: var(--tm-media-bg); }
.message-attachment.is-clip .capsule-media { width: 100%; max-height: 16rem; margin: 0; border-radius: var(--tm-r-sm); background: var(--tm-bg); }
.message-attachment-remove { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--tm-r-full); background: var(--tm-scrim); color: var(--tm-on-scrim); }
.message-attachment-remove .tm-ico { width: 16px; height: 16px; }
.letter-form .message-attachment-tools { display: grid; gap: 8px; margin-top: var(--tm-s-4); }
.attach-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.letter-form .attach-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; margin: 0; padding: 8px 4px; border: 1.5px solid var(--tm-line); border-radius: var(--tm-r-sm); background: var(--tm-surface); color: var(--tm-ink); font-size: .875rem; font-weight: 700; cursor: pointer; }
.letter-form .attach-tile small { color: var(--tm-ink-2); font-size: .75rem; font-weight: 500; }
.letter-form .attach-tile .tm-ico { width: 22px; height: 22px; }
.letter-form .attach-tile[aria-expanded="true"] { border-color: var(--tm-ink); }
.letter-form .message-attachment-tools:focus-within .attachment-file-label { outline: 0; }
.letter-form .message-attachment-tools > input:focus-visible ~ .attach-tiles .attachment-file-label { outline: 3px solid var(--tm-focus); outline-offset: 2px; }
.capture-file { margin-bottom: var(--tm-s-3); }
.tm-radio { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tm-chip, .tm-seg > label { position: relative; cursor: pointer; }
.tm-chip:has(> .tm-radio:focus-visible), .tm-seg > label:has(> .tm-radio:focus-visible) { outline: 3px solid var(--tm-focus); outline-offset: 2px; }
.letter-submit { width: 100%; margin-top: var(--tm-s-5); }
.guest-write-head { display: flex; align-items: flex-end; gap: 14px; }
.guest-write-day { color: var(--tm-red); font: 800 5.75rem/.8 var(--tm-font-num); }
.guest-write-head > div { display: flex; flex-direction: column; padding-bottom: 2px; }
.guest-write-when { color: var(--tm-ink-2); font-size: .875rem; font-weight: 700; }
.guest-write-head h1 { margin: 0; font-size: 1.625rem; font-weight: 800; letter-spacing: -0.035em; }
.guest-write-intro { margin: var(--tm-s-3) 0 var(--tm-s-5); color: var(--tm-ink-2); font-size: .9375rem; }
.guest-done { display: grid; gap: var(--tm-s-5); max-width: 26rem; margin: var(--tm-s-6) auto 0; }
.guest-done-actions { display: grid; gap: var(--tm-s-2); text-align: center; }
.guest-done-actions .field-hint { margin: 0; }

/* Form controls from the mockups: chips, segmented choice, switch. */
.tm-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--tm-r-full); background: var(--tm-bg); color: var(--tm-ink); font-size: .875rem; font-weight: 600; }
.tm-chip.is-on { background: var(--tm-ink); color: var(--tm-surface); }
.tm-chip-line { background: none; box-shadow: inset 0 0 0 1.5px var(--tm-line); }
.tm-chip-line.is-on { box-shadow: none; }
.tm-seg { display: flex; gap: 4px; padding: 4px; border-radius: var(--tm-r-sm); background: var(--tm-bg); }
.tm-seg > label { display: flex; align-items: center; justify-content: center; margin: 0; flex: 1; min-height: 40px; border: 0; border-radius: var(--tm-r-xs); background: none; color: var(--tm-ink-2); font-size: .9375rem; font-weight: 600; }
.tm-seg > label.is-on { background: var(--tm-surface); color: var(--tm-ink); font-weight: 800; box-shadow: var(--tm-e-1); }
.tm-switch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--tm-s-3); min-height: 52px; margin: 0; cursor: pointer; }
.tm-switch-row > span { display: flex; flex-direction: column; }
.tm-switch-row small { color: var(--tm-ink-2); font-size: .8125rem; font-weight: 400; }
.tm-switch { appearance: none; position: relative; flex: none; width: 50px; height: 30px; margin: 0; border: 0; border-radius: var(--tm-r-full); background: var(--tm-line-strong); cursor: pointer; transition: background-color var(--tm-fast) var(--tm-ease); }
.tm-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--tm-surface); transition: left var(--tm-fast) var(--tm-ease); }
.tm-switch:checked { background: var(--tm-ink); }
.tm-switch:checked::after { left: 23px; }
.tm-switch:focus-visible { outline: 3px solid var(--tm-focus); outline-offset: 2px; }

/* New anniversary (NewDay / WNewDay). */
.new-day-top { display: flex; align-items: center; gap: 8px; margin-bottom: var(--tm-s-4); }
.new-day-top h1 { margin: 0; font-size: 1.0625rem; font-weight: 800; }
.new-day-grid { display: grid; gap: var(--tm-s-4); }
.new-day-fields { display: grid; gap: var(--tm-s-5); min-width: 0; margin: 0; padding: 20px 18px; border: 0; }
.new-day-field { display: grid; gap: 8px; min-width: 0; }
.new-day-label { font-size: .875rem; font-weight: 700; }
.new-day-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.new-day-fields .anniversary-date-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.new-day-fields .anniversary-date-fields label { font-size: .8125rem; color: var(--tm-ink-2); }
.new-day-pair { display: grid; gap: var(--tm-s-4); }
.new-day-more h3 { margin: var(--tm-s-4) 0 var(--tm-s-2); font-size: 1rem; }
.new-day-preview { display: grid; gap: var(--tm-s-3); align-content: start; min-width: 0; }
.new-day-preview > .btn { width: 100%; }
.new-day-preview .field-hint { margin: 0; }

/* Birthday sheet (SheetBirthday). */
.birthday-form fieldset { display: grid; gap: 8px; min-width: 0; }
.birthday-form #birthday-date-fields { margin: var(--tm-s-2) 0; padding: 0; border: 0; }
.birthday-form .birthday-date-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.birthday-form .birthday-save { width: 100%; margin-top: var(--tm-s-4); }
@media (prefers-reduced-motion: reduce) { .tm-switch, .tm-switch::after { transition: none; } }

@media (min-width: 600px) {
    .capsule-actions { grid-auto-flow: column; grid-auto-columns: 1fr; }
    .new-day-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
    .tm-sheet { inset: 0; width: min(100% - 2 * var(--tm-gutter), 30rem); max-height: calc(100dvh - 4rem); margin: auto; border-radius: var(--tm-r-lg); }
    .tm-sheet-panel { padding: 20px 24px 24px; }
    .tm-sheet-grab { display: none; }
    /* The family list opens under its button, like the mockup's flyout. */
    .family-sheet { inset: calc(var(--tm-header-h) - 4px) auto auto max(var(--tm-gutter), calc((100vw - var(--tm-page-max)) / 2 + 7.5rem)); width: 23.75rem; margin: 0; }
    .family-sheet::backdrop { background: var(--tm-scrim-light); }
}

/* Phones: the family name replaces the brand, as in the mockup's top bar. */
@media (max-width: 599.98px) {
    .header-inner:has(.family-switcher) > .brand { display: none; }
    .family-trigger { font-size: 1.3125rem; }
}

/* Web: the leaf on the left, the details on the right (WCapsule, WOpened). */
@media (min-width: 840px) {
    .capsule-share-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; margin-left: 6px; font-size: var(--tm-text-sm); font-weight: 700; }
    .capsule-share-entry { display: inline-flex; align-items: center; width: auto; padding: 0 14px; border-radius: var(--tm-r-sm); background: var(--tm-surface); }
    .capsule-overview, .capsule-opened { grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr); gap: var(--tm-s-6); align-items: start; }
    .capsule-overview-title { position: static; width: auto; height: auto; overflow: visible; clip: auto; margin: 0; font-size: var(--tm-text-h1); font-weight: 800; letter-spacing: -0.03em; white-space: normal; }
    .capsule-leaf-times { display: none; }
    .capsule-opened-side { position: sticky; top: calc(var(--tm-header-h) + var(--tm-s-4)); }
    .family-head-actions > .family-settings-entry { display: inline-flex; background: var(--tm-surface); }
    .photos-restore-entry { background: var(--tm-surface); }
    .photos-restore-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
    .family-settings-row { display: none; }
    .family-clocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); margin-bottom: var(--tm-s-4); border-radius: var(--tm-r-leaf); background: var(--tm-surface); }
    .family-clocks > div { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; border-left: 1px solid var(--tm-line); }
    .family-clocks > div:first-child { border-left: 0; }
    .family-clocks span { font-size: .875rem; font-weight: 700; }
    .family-clocks time { font: 800 3.25rem/1 var(--tm-font-num); }
    .family-clocks small { color: var(--tm-ink-2); font-size: .8125rem; }
    .family-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; background: none; }
    .family-people > li + li { border-top: 0; }
    .family-person { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; min-height: 84px; padding: 16px; border-radius: var(--tm-r-leaf); background: var(--tm-surface); }
    .family-person-seal { width: 48px; height: 48px; font-size: 1rem; border-radius: var(--tm-r-xs); }
    .family-person-clock { display: none; }
    .invite-focused-view:has(.guest-write-head) { max-width: 960px; }
    .guided-message:has(> .guest-write-head) { display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(0, 1.5fr); column-gap: var(--tm-s-8); align-items: start; }
    .guided-message > .guest-write-head { grid-column: 1; grid-row: 1; }
    .guided-message > .guest-write-intro { grid-column: 1; grid-row: 2; }
    .guided-message > .message-compose { grid-column: 2; grid-row: 1 / span 3; padding: 28px 32px 32px; border-radius: var(--tm-r-leaf); background: var(--tm-surface); }
    .guest-write-day { font-size: 8rem; }
    .new-day-grid { grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr); gap: var(--tm-s-6); align-items: start; }
    .new-day-fields { padding: 28px 32px; }
    .new-day-preview { position: sticky; top: calc(var(--tm-header-h) + var(--tm-s-4)); }
}
