 .theme-toggle { color: var(--ink); }
/* 공통 컴포넌트: 색상은 기존 밝게/어둡게 테마를 그대로 사용합니다. */
.page-reaction { margin: 14px 0 20px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.reaction-main { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.reaction-main > span { font-size: 14px; color: var(--muted); word-break: keep-all; }
.like-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 24px; background: var(--soft); color: var(--ink); font: inherit; cursor: pointer; transition: background .18s, transform .18s; }
.like-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.like-button strong { min-width: 1.4em; font-variant-numeric: tabular-nums; }
.like-button[aria-pressed='true'] { color: #aa334a; background: #fff0f3; border-color: #e6a7b3; }
.like-button[aria-pressed='true'] svg { fill: currentColor; }
:root[data-theme='dark'] .like-button[aria-pressed='true'] { color: #ffb1c1; background: #40242e; border-color: #985466; }
.like-button:active { transform: scale(.96); }
.like-button:focus-visible, .like-retry:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.like-button:disabled { cursor: wait; opacity: .65; }
.reaction-detail { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 14px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.reaction-detail small { font-size: inherit; }
.reaction-detail [role='status']:empty { display: none; }
.like-retry { font: inherit; color: var(--accent); background: none; border: 0; padding: 6px; text-decoration: underline; cursor: pointer; }
.like-retry[hidden] { display: none; }
.sidebar nav a { min-width: 0; }
.sidebar nav a > span:last-child { width: auto; flex: 1; min-width: 0; font-size: inherit; line-height: 1.6; white-space: normal; overflow-wrap: break-word; word-break: keep-all; }
.mobile-menu-sheet:not([open]) { display: none; }
footer { flex-wrap: wrap; line-height: 1.7; }
footer > span { flex-basis: 100%; order: 2; }
footer small { white-space: nowrap; }
.greeting-letter { max-width: 960px; margin: 24px auto; padding: clamp(24px, 5vw, 56px); }
.greeting-letter p { line-height: 2; word-break: keep-all; margin: 0 0 24px; }
.greeting-letter h2 { margin: 0 0 28px; font-size: clamp(23px, 3vw, 30px); line-height: 1.5; }
.greeting-signature { margin-top: 40px; text-align: right; border-top: 1px solid var(--line); padding-top: 24px; }
.greeting-signature strong { display: block; margin-top: 8px; color: var(--accent); font-size: 23px; }
.greeting-promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.greeting-promises article { padding: 22px; background: var(--soft); border-radius: 14px; }
.greeting-promises h3 { margin-top: 0; }
.greeting-promises p { line-height: 1.8; color: var(--muted); word-break: keep-all; }
.greeting-link { display: inline-flex; padding: 12px 18px; border-radius: 10px; background: var(--accent); color: var(--panel); text-decoration: none; }
@media (max-width: 760px) {
  .page-reaction { padding: 14px; }
  .reaction-detail { display: block; line-height: 1.7; }
  .reaction-detail [role='status'] { display: block; }
  /* 2개 바로가기 + 오른손 엄지로 여는 전체 메뉴. 이전 가로 스크롤 규칙을 대체합니다. */
  html { scroll-padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  .mobile-nav {
    display: grid; grid-template-columns: 1fr 1fr 1.18fr; gap: 8px;
    overflow: visible; box-sizing: border-box;
    padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    box-shadow: 0 -4px 20px #30251b08;
  }
  .mobile-nav a, .mobile-nav a:last-child, .mobile-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    grid-column: auto; min-width: 0; min-height: 56px; margin: 0; padding: 6px 4px;
    border: 0; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 600; line-height: 1.3;
    white-space: normal; text-align: center; text-decoration: none; cursor: pointer; touch-action: manipulation;
  }
  .mobile-nav a { background: transparent; color: var(--muted); }
  .mobile-nav a.active { background: var(--soft-blue); color: var(--accent); font-weight: 750; }
  .mobile-nav .mobile-menu-trigger { background: var(--accent); color: var(--panel); }
  .mobile-nav svg { width: 22px; height: 22px; flex-shrink: 0; }
  .mobile-nav a:focus-visible, .mobile-nav button:focus-visible,
  .mobile-menu-sheet a:focus-visible, .mobile-menu-sheet button:focus-visible {
    outline: 3px solid var(--accent); outline-offset: 3px;
  }
  .mobile-menu-sheet {
    position: fixed; inset: auto max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) auto;
    box-sizing: border-box; width: min(420px, calc(100% - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    max-width: none; max-height: calc(100vh - 32px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 32px - env(safe-area-inset-bottom, 0px));
    margin: 0; padding: 18px 16px 12px; border: 1px solid var(--line); border-radius: 24px;
    background: var(--panel); color: var(--ink); box-shadow: 0 16px 60px #0003;
    overflow: hidden; overscroll-behavior: contain;
  }
  .mobile-menu-sheet[open] { display: flex; flex-direction: column; animation: mobile-menu-enter .18s ease-out; }
  .mobile-menu-sheet::backdrop { background: var(--overlay); }
  .mobile-menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px; margin: -4px; }
  .mobile-menu-grid a {
    display: flex; align-items: center; gap: 10px; position: relative; min-height: 68px; min-width: 0; box-sizing: border-box;
    padding: 13px 12px; border: 1px solid transparent; border-radius: 14px;
    background: var(--soft); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; line-height: 1.45;
    word-break: keep-all; overflow-wrap: anywhere; touch-action: manipulation;
  }
  .mobile-menu-grid a:last-child:nth-child(odd) { grid-column: 1/-1; }
  .mobile-menu-grid a > span:not(.mobile-menu-check) { min-width: 0; }
  .mobile-menu-grid svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--accent); }
  .mobile-menu-grid a.active { border-color: var(--accent); background: var(--soft-blue); color: var(--accent); font-weight: 750; }
  .mobile-menu-check { position: absolute; top: 3px; right: 6px; font-size: 11px; line-height: 1; }
  .mobile-menu-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-shrink: 0; padding-top: 12px; }
  .mobile-menu-sheet .mobile-menu-close {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 104px; min-height: 48px;
    margin: 0; padding: 10px 16px; border: 0; border-radius: 12px; background: var(--accent); color: var(--panel);
    font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; touch-action: manipulation;
  }
  .mobile-menu-close svg { width: 19px; height: 19px; }
  .mobile-menu-grid a:active, .mobile-menu-close:active, .mobile-menu-trigger:active { opacity: .8; }
  footer { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
  .greeting-promises { grid-template-columns: 1fr; }
  footer > span { display: block; }
}
@keyframes mobile-menu-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 761px) { .mobile-menu-sheet, .mobile-menu-sheet[open] { display: none; } }
@media (prefers-reduced-motion: reduce) { .mobile-menu-sheet[open] { animation: none; } }
@media print { .mobile-menu-sheet, .mobile-menu-sheet[open], .mobile-nav { display: none !important; } .mobile-menu-sheet::backdrop { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .like-button { transition: none; } .like-button:active { transform: none; } }
@media print { .page-reaction, .greeting-link { display: none !important; } .greeting-letter { max-width: none; margin: 0; padding: 20px 0; } .greeting-promises article { break-inside: avoid; } }

.data-updated{margin:14px 0 0;color:var(--muted);font-size:13px;font-weight:600;}

/* 로고의 두 줄을 같은 폭으로 정렬합니다. */
.topbar .brand > span { display: block; min-width: 0; width: max-content; text-align: left; }
.topbar .brand small { width: 0; min-width: 100%; font-size: .55em; letter-spacing: 0; text-align: justify; text-align-last: justify; white-space: nowrap; }
.topbar .brand svg { flex-shrink: 0; }

/* 상단 카드의 오른쪽 아래 테두리에 좋아요 버튼을 걸칩니다. */
main > .has-page-reaction { position: relative; overflow: visible; padding-bottom: 44px; margin-bottom: 42px; }
.has-page-reaction > .page-reaction { position: absolute; right: 28px; bottom: 0; z-index: 2; transform: translateY(50%); margin: 0; padding: 0; border: 0; background: none; }
.page-reaction .reaction-main { display: block; }
.page-reaction .like-button { background: var(--panel); box-shadow: 0 3px 10px #30251b0a; }
.page-reaction .reaction-detail { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.page-reaction.is-error .reaction-detail { top: calc(100% + 8px); right: 0; width: min(280px, calc(100vw - 72px)); height: auto; margin: 0; padding: 10px 12px; overflow: visible; clip-path: none; white-space: normal; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); }
@media (max-width: 760px) { .has-page-reaction > .page-reaction { right: 18px; } }
@media print { .has-page-reaction > .page-reaction { display: none; } }

/* Lucide: common icon geometry across desktop, mobile and dark mode. */
.lucide { display: inline-block; width: 1.1em; height: 1.1em; flex: 0 0 auto; vertical-align: -.18em; stroke-width: 1.8; }
.sidebar nav a > .lucide { width: 22px; height: 22px; margin-right: 0; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; }
.mobile-nav .lucide, .mobile-menu-grid > a > .lucide { width: 23px; height: 23px; }
.mobile-menu-grid .mobile-menu-check .lucide { width: 12px; height: 12px; stroke-width: 2.5; }
.topbar .brand > .lucide { width: 34px; height: 34px; }
.theme-toggle, [data-print] { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.theme-toggle .lucide { width: 18px; height: 18px; }
.item-icon .lucide { width: 22px; height: 22px; }
.dialog-close .lucide { width: 22px; height: 22px; }
.reserve-sort .lucide { width: 14px; height: 14px; }
.passme-lucide-scene { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px 0; color: var(--accent); }
.passme-visual .passme-lucide-scene .lucide { width: 72px; height: 94px; stroke-width: 1.4; }
.passme-visual .passme-lucide-scene .lucide-wifi { width: 32px; height: 40px; stroke-width: 1.8; }
@media (max-width: 760px) { .topbar .brand > .lucide { width: 26px; height: 26px; } }
@media (max-width: 359px) { .topbar .brand > .lucide { width: 23px; height: 23px; } }

/* Native control arrows also use the Lucide chevron. */
select { appearance: none; -webkit-appearance: none; padding-right: 30px !important; background-image: url("data:image/svg+xml,%3Csvg%0A%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20width%3D%2224%22%0A%20%20height%3D%2224%22%0A%20%20viewBox%3D%220%200%2024%2024%22%0A%20%20fill%3D%22none%22%0A%20%20stroke%3D%22%23805c37%22%0A%20%20stroke-width%3D%222%22%0A%20%20stroke-linecap%3D%22round%22%0A%20%20stroke-linejoin%3D%22round%22%0A%3E%0A%20%20%3Cpath%20d%3D%22m6%209%206%206%206-6%22%20%2F%3E%0A%3C%2Fsvg%3E%0A"); background-repeat: no-repeat; background-position: right 8px center; background-size: 16px 16px; }
summary { position: relative; list-style: none; padding-right: 28px !important; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ''; }
summary::after { content: ''; position: absolute; right: 6px; top: 50%; width: 18px; height: 18px; background-color: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg%0A%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20width%3D%2224%22%0A%20%20height%3D%2224%22%0A%20%20viewBox%3D%220%200%2024%2024%22%0A%20%20fill%3D%22none%22%0A%20%20stroke%3D%22%23805c37%22%0A%20%20stroke-width%3D%222%22%0A%20%20stroke-linecap%3D%22round%22%0A%20%20stroke-linejoin%3D%22round%22%0A%3E%0A%20%20%3Cpath%20d%3D%22m6%209%206%206%206-6%22%20%2F%3E%0A%3C%2Fsvg%3E%0A") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%0A%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20width%3D%2224%22%0A%20%20height%3D%2224%22%0A%20%20viewBox%3D%220%200%2024%2024%22%0A%20%20fill%3D%22none%22%0A%20%20stroke%3D%22%23805c37%22%0A%20%20stroke-width%3D%222%22%0A%20%20stroke-linecap%3D%22round%22%0A%20%20stroke-linejoin%3D%22round%22%0A%3E%0A%20%20%3Cpath%20d%3D%22m6%209%206%206%206-6%22%20%2F%3E%0A%3C%2Fsvg%3E%0A") center/contain no-repeat; transform: translateY(-50%); }
details[open] > summary::after { transform: translateY(-50%) rotate(180deg); }
@media (max-width: 359px) {
  .mobile-menu-grid a { padding: 12px 10px; gap: 8px; font-size: 14px; }
  .mobile-menu-grid > a > .lucide { width: 20px; height: 20px; }
}

/* 모바일 인사말 본문: 16px에서 18px로, 약 1.5pt 확대. */
@media (max-width: 760px) {
  body[data-page="greeting"] .greeting-letter p,
  body[data-page="greeting"] .greeting-promises p { font-size: 18px; line-height: 1.9; }
}
