    :root {
      --bg: #0f1f1a;
      --panel: #163028;
      --ink: #e8f2ec;
      --muted: #9bb5a8;
      --accent: #3d9b6e;
      --line: rgba(232,242,236,0.12);
      --key: #1a3a30;
    }
    * { box-sizing: border-box; }
    html, body {
      margin: 0; padding: 0; height: 100%;
      background: var(--bg); color: var(--ink);
      font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    }
    .app {
      min-height: 100%;
      display: flex; flex-direction: column;
      padding: 18px 16px 88px;
      background:
        radial-gradient(120% 80% at 10% -10%, #245844 0%, transparent 55%),
        radial-gradient(90% 60% at 100% 0%, #1a3a2e 0%, transparent 50%),
        var(--bg);
    }
    .ops-panel {
      margin: 0 0 10px;
    }
    #ops-panel {
      display: none;
    }
    #ops-panel.is-ops-unlocked {
      display: block;
    }
    .ops-pin-gate {
      position: fixed;
      inset: 0;
      z-index: 12000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px 16px;
      background: rgba(8, 16, 13, 0.72);
      backdrop-filter: blur(4px);
    }
    .ops-pin-gate[hidden] {
      display: none !important;
    }
    .ops-pin-card {
      width: min(100%, 340px);
      border-radius: 16px;
      border: 1px solid var(--line);
      background: #163028;
      padding: 18px 16px 16px;
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    }
    .ops-pin-title {
      margin: 0 0 6px;
      font-size: 17px;
      font-weight: 700;
      letter-spacing: -0.01em;
      color: #dff5e8;
    }
    .ops-pin-lead {
      margin: 0 0 14px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }
    .ops-pin-label {
      display: block;
      margin: 0 0 6px;
      font-size: 12px;
      font-weight: 650;
      color: #c5d9cd;
    }
    .ops-pin-label + .ops-pin-label {
      margin-top: 10px;
    }
    .ops-pin-input {
      width: 100%;
      margin: 0 0 0;
      padding: 10px 12px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: rgba(26, 58, 48, 0.65);
      color: var(--ink);
      font: inherit;
      font-size: 16px;
      letter-spacing: 0.18em;
    }
    .ops-pin-input:focus {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .ops-pin-error {
      min-height: 18px;
      margin: 8px 0 0;
      color: #f0a8a0;
      font-size: 12px;
      line-height: 1.35;
    }
    .ops-pin-actions {
      display: flex;
      gap: 8px;
      margin-top: 14px;
    }
    .ops-pin-actions button {
      appearance: none;
      flex: 1 1 0;
      min-height: 42px;
      border-radius: 10px;
      border: 1px solid var(--line);
      font: inherit;
      font-size: 14px;
      font-weight: 650;
      cursor: pointer;
    }
    .ops-pin-cancel {
      background: rgba(26, 58, 48, 0.55);
      color: var(--muted);
    }
    .ops-pin-submit {
      background: rgba(61, 155, 110, 0.28);
      border-color: rgba(61, 155, 110, 0.5);
      color: #dff5e8;
    }
    .ops-pin-actions button:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .ops-auth-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 12px;
    }
    .ops-auth-btn {
      appearance: none;
      flex: 1 1 auto;
      min-height: 36px;
      padding: 8px 10px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: rgba(26, 58, 48, 0.45);
      color: #c5d9cd;
      font: inherit;
      font-size: 12px;
      font-weight: 650;
      cursor: pointer;
    }
    .ops-auth-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .ops-toggle {
      appearance: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      width: 100%;
      margin: 0;
      padding: 8px 10px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: rgba(26, 58, 48, 0.55);
      color: var(--muted);
      font: inherit;
      font-size: 12px;
      font-weight: 650;
      letter-spacing: 0.02em;
      cursor: pointer;
      min-height: 36px;
      text-align: left;
    }
    .ops-toggle:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .ops-toggle[aria-expanded="true"] {
      color: #dff5e8;
      border-color: rgba(61, 155, 110, 0.45);
      background: rgba(61, 155, 110, 0.14);
    }
    .ops-chevron {
      flex: 0 0 auto;
      font-size: 11px;
      opacity: 0.8;
    }
    .ops-body {
      display: none;
      margin-top: 8px;
      padding: 10px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: rgba(22, 48, 40, 0.72);
    }
    .ops-panel.is-open .ops-body { display: block; }
    .ops-section-title {
      margin: 0 0 8px;
      font-size: 14px;
      font-weight: 700;
      color: #dff5e8;
      letter-spacing: -0.01em;
    }
    .ops-visit {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .ops-visit-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      box-sizing: border-box;
      padding: 10px 12px;
      border-radius: 10px;
      border: 1px solid rgba(159, 227, 191, 0.35);
      background: rgba(26, 58, 48, 0.55);
      color: #dff5e8;
      font-size: 13px;
      font-weight: 700;
      text-decoration: none;
      letter-spacing: -0.01em;
    }
    .ops-visit-link:focus-visible {
      outline: 2px solid #9fe3bf;
      outline-offset: 2px;
    }
    .ops-note {
      margin: 8px 0 0;
      color: rgba(155, 181, 168, 0.8);
      font-size: 11px;
      line-height: 1.35;
    }
    .ops-store {
      margin-top: 14px;
      padding-top: 12px;
      border-top: 1px solid rgba(232, 242, 236, 0.1);
    }
    .ops-store .ops-section-title {
      margin-bottom: 4px;
    }
    .ops-store-lead {
      margin: 0 0 10px;
      color: rgba(155, 181, 168, 0.85);
      font-size: 11px;
      line-height: 1.4;
    }
    .ops-store-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .ops-store-item {
      border: 1px solid var(--line);
      border-radius: 10px;
      background: rgba(26, 58, 48, 0.45);
      padding: 8px 10px;
      min-width: 0;
    }
    .ops-store-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 4px;
    }
    .ops-store-label {
      font-size: 12px;
      font-weight: 700;
      color: var(--ink);
    }
    .ops-store-copy {
      appearance: none;
      flex: 0 0 auto;
      margin: 0;
      padding: 4px 8px;
      border-radius: 8px;
      border: 1px solid rgba(61, 155, 110, 0.45);
      background: rgba(61, 155, 110, 0.16);
      color: #dff5e8;
      font: inherit;
      font-size: 11px;
      font-weight: 650;
      cursor: pointer;
      min-height: 28px;
      white-space: nowrap;
    }
    .ops-store-copy:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .ops-store-copy.is-done {
      border-color: rgba(159, 227, 191, 0.55);
      color: #9fe3bf;
    }
    .ops-store-value {
      margin: 0;
      font-size: 13px;
      line-height: 1.45;
      color: #e8f2ec;
      word-break: break-word;
      white-space: pre-wrap;
      user-select: all;
    }
    .title-row {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin: 0 0 18px;
      position: relative;
    }
    .title-block {
      flex: 1 1 auto;
      min-width: 0;
    }
    h1 {
      margin: 0;
      font-size: 24px;
      line-height: 1.3;
      font-weight: 700;
      letter-spacing: -0.02em;
    }
    .title-en {
      margin: 4px 0 0;
      font-size: 13px;
      font-weight: 500;
      line-height: 1.35;
      letter-spacing: 0.01em;
      color: var(--muted);
    }
    .title-tools {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 8px;
      flex: 0 0 auto;
    }
    @media (max-width: 340px) {
      .title-tools { align-items: flex-start; width: 100%; }
    }
    .title-date-row {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }
    .today-date {
      flex: 0 0 auto;
      margin: 0;
      color: #c5d9cd;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: -0.01em;
      line-height: 1.35;
      text-align: right;
      white-space: nowrap;
      cursor: default;
      user-select: none;
    }
    .title-update-btn {
      appearance: none;
      flex: 0 0 auto;
      margin: 0;
      padding: 5px 10px;
      min-height: 30px;
      border-radius: 999px;
      border: 1px solid rgba(125, 206, 160, 0.45);
      background: rgba(61, 155, 110, 0.18);
      color: #dff5e8;
      font: inherit;
      font-size: 12px;
      font-weight: 700;
      line-height: 1.2;
      letter-spacing: -0.01em;
      cursor: pointer;
      white-space: nowrap;
      -webkit-tap-highlight-color: rgba(61, 155, 110, 0.25);
    }
    .title-update-btn:active {
      background: rgba(61, 155, 110, 0.32);
    }
    .title-update-btn:disabled {
      opacity: 0.55;
      cursor: default;
    }
    .title-update-btn:focus-visible {
      outline: 2px solid #f2fff8;
      outline-offset: 2px;
    }
    .title-update-btn.is-update-ready,
    #app-shell-refresh.is-update-ready {
      animation: update-btn-blink 1.1s ease-in-out infinite;
      border-color: #9ee6bf;
      background: rgba(61, 155, 110, 0.42);
      color: #ffffff;
      box-shadow: 0 0 0 2px rgba(125, 206, 160, 0.35);
    }
    @keyframes update-btn-blink {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.42; transform: scale(1.04); }
    }
    @media (prefers-reduced-motion: reduce) {
      .title-update-btn.is-update-ready,
      #app-shell-refresh.is-update-ready {
        animation: none;
        opacity: 1;
      }
    }
    .ops-secret-entry {
      position: absolute;
      left: 0;
      bottom: -14px;
      appearance: none;
      border: 0;
      margin: 0;
      padding: 2px 4px;
      background: transparent;
      color: rgba(155, 181, 168, 0.22);
      font: inherit;
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.04em;
      cursor: pointer;
      min-height: 22px;
      line-height: 1.2;
      z-index: 1;
    }
    .ops-secret-entry:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
      color: var(--muted);
    }
    @media (max-width: 340px) {
      .title-row { flex-wrap: wrap; }
      .today-date { text-align: left; }
      h1 { font-size: 22px; }
    }
    .lead { margin: 0 0 22px; color: var(--muted); font-size: 15px; line-height: 1.5; }
    .info-box {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 14px 12px 12px;
    }
    .info-box > h2 {
      margin: 0 0 12px;
      padding: 0 4px;
      font-size: 17px;
      font-weight: 700;
      line-height: 1.3;
    }
    .keys {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .key {
      appearance: none;
      display: block;
      width: 100%;
      text-align: left;
      background: var(--key);
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 12px 10px;
      color: inherit;
      cursor: pointer;
      font: inherit;
      min-height: 72px;
    }
    .key:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .key.has-value {
      border-color: rgba(61,155,110,0.45);
      background: #1c4338;
    }
    .key strong { display: block; font-size: 15px; margin-bottom: 4px; }
    .key .hint { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
    .key .preview {
      display: none;
      margin-top: 6px;
      color: var(--ink);
      font-size: 12px;
      line-height: 1.4;
      white-space: pre-wrap;
      word-break: break-word;
      max-height: 3.6em;
      overflow: hidden;
    }
    .key.has-value .hint { display: none; }
    .key.has-value .preview { display: block; }
    .status-block {
      margin-top: 14px;
      margin-bottom: 4px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      overflow: hidden;
    }
    .status-block.open {
      border-color: rgba(61,155,110,0.4);
      background: #1c4338;
    }
    .status-toggle {
      appearance: none;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      text-align: left;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      padding: 14px 12px;
      cursor: pointer;
      min-height: 52px;
    }
    .status-toggle:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: -2px;
    }
    .status-toggle-text {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }
    .status-toggle-text strong {
      margin: 0;
      font-size: 16px;
      font-weight: 700;
      line-height: 1.35;
      letter-spacing: -0.02em;
    }
    .status-hint {
      color: var(--muted);
      font-size: 12px;
      font-weight: 500;
      line-height: 1.35;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .status-block.has-data .status-hint {
      color: var(--ink);
    }
    .status-toggle .chev {
      flex: 0 0 auto;
      color: var(--muted);
      font-size: 12px;
      transition: transform 0.15s ease;
    }
    .status-block.open .status-toggle .chev {
      transform: rotate(180deg);
      color: var(--accent);
    }
    .status-panel {
      display: none;
      padding: 0 12px 12px;
      border-top: 1px solid var(--line);
    }
    .status-block.open .status-panel { display: block; }
    .status-mode {
      display: none;
      margin: 10px 0 6px;
      color: var(--accent);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.02em;
    }
    .status-block.has-data .status-mode { display: block; }
    .status-empty {
      margin: 10px 0 0;
      padding: 12px 10px;
      border-radius: 12px;
      border: 1px dashed rgba(155,181,168,0.35);
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }
    .status-block.has-data .status-empty { display: none; }
    .status-body { display: none; }
    .status-block.has-data .status-body { display: block; }
    .status-filled {
      margin: 0;
      padding: 8px 10px;
      border-radius: 10px;
      background: rgba(0,0,0,0.18);
      border: 1px solid rgba(232,242,236,0.08);
      color: var(--ink);
      font-size: 13px;
      line-height: 1.45;
      white-space: pre-wrap;
      word-break: break-word;
    }
    .status-filled.is-loading {
      color: var(--muted);
      font-style: italic;
    }
    .novelist-entry,
    .share-entry,
    .cheer-entry,
    .chamzone-credit {
      margin-top: 14px;
      margin-bottom: 10px;
      scroll-margin-bottom: 96px;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 8px;
      padding: 4px 2px;
      border: 0;
      background: transparent;
      overflow: visible;
    }
    .chamzone-credit {
      align-items: center;
      margin-top: 0;
      margin-bottom: 18px;
      padding: 6px 2px 20px;
    }
    .chamzone-credit-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      width: 100%;
      margin: 0;
      padding: 14px 14px 13px;
      border-radius: 16px;
      background: #fff;
      box-sizing: border-box;
      min-height: 72px;
    }
    .chamzone-credit-icon {
      display: block;
      width: 40px;
      height: 40px;
      flex: 0 0 auto;
      object-fit: contain;
    }
    .chamzone-credit-logo {
      display: block;
      flex: 0 0 auto;
      width: auto;
      max-width: min(200px, calc(100vw - 120px));
      height: 36px;
      object-fit: contain;
      object-position: center;
    }
    .share-entry {
      margin-bottom: 6px;
      padding-bottom: 0;
    }
    .novelist-entry {
      margin-top: 0;
      margin-bottom: 6px;
      padding-top: 0;
      padding-bottom: 0;
    }
    .cheer-row {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 12px;
      overflow: visible;
    }
    .cheer-text {
      flex: 0 1 auto;
      margin: 0;
      max-width: calc(100% - 110px);
      font-size: 13px;
      line-height: 1.45;
      font-weight: 600;
      color: var(--ink);
    }
    .cheer-media {
      appearance: none;
      border: 0;
      padding: 0;
      flex-shrink: 0;
      width: 48px;
      height: 48px;
      margin-left: 0;
      margin-right: 78px;
      background: transparent;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      overflow: visible;
      transform-origin: center center;
      position: relative;
      z-index: 2;
    }
    .cheer-media:focus-visible {
      outline: 2px solid var(--accent, #c4e87a);
      outline-offset: 3px;
      border-radius: 8px;
    }
    .cheer-media.is-cheers {
      animation: cheer-pop 480ms cubic-bezier(0.34, 1.45, 0.64, 1);
    }
    @keyframes cheer-pop {
      0% { transform: scale(1); }
      40% { transform: scale(1.22); }
      100% { transform: scale(1); }
    }
    .cheer-media img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
      background: transparent;
      pointer-events: none;
    }
    .cheer-burst-layer {
      position: absolute;
      left: 50%;
      top: 50%;
      width: 0;
      height: 0;
      pointer-events: none;
      z-index: 6;
      overflow: visible;
    }
    .cheer-fly-heart {
      position: absolute;
      left: 0;
      top: 0;
      color: #ff2d55;
      font-size: 18px;
      line-height: 1;
      font-weight: 900;
      text-shadow: 0 1px 0 rgba(80, 0, 20, 0.35);
      transform: translate(-50%, -50%);
      animation: cheer-fly-right 720ms cubic-bezier(0.22, 0.9, 0.3, 1) forwards;
      will-change: transform, opacity;
    }
    @keyframes cheer-fly-right {
      0% {
        transform: translate(-50%, -50%) scale(0.55);
        opacity: 0;
      }
      12% {
        transform: translate(-50%, -55%) scale(1);
        opacity: 1;
      }
      58% {
        transform: translate(46px, -62%) scale(1.12);
        opacity: 1;
      }
      72% {
        transform: translate(54px, -70%) scale(1.55);
        opacity: 0.95;
      }
      100% {
        transform: translate(58px, -76%) scale(0.15);
        opacity: 0;
      }
    }
    .cheer-fly-click {
      position: absolute;
      left: 0;
      top: 0;
      color: #ffffff;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: -0.02em;
      line-height: 1;
      white-space: nowrap;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
      transform: translate(42px, -70%);
      animation: cheer-click-burst 1200ms cubic-bezier(0.2, 1.2, 0.35, 1) forwards;
      will-change: transform, opacity;
    }
    @keyframes cheer-click-burst {
      0% {
        transform: translate(42px, -70%) scale(0.4);
        opacity: 0;
      }
      12% {
        transform: translate(50px, -78%) scale(1.2);
        opacity: 1;
      }
      72% {
        transform: translate(56px, -86%) scale(1);
        opacity: 1;
      }
      100% {
        transform: translate(60px, -94%) scale(0.85);
        opacity: 0;
      }
    }
    .cheer-fly-shard {
      position: absolute;
      left: 0;
      top: 0;
      color: #ff4d6d;
      font-size: 11px;
      line-height: 1;
      font-weight: 900;
      --dx: 0px;
      --dy: 0px;
      transform: translate(50px, -70%);
      animation: cheer-shard-pop 520ms ease-out forwards;
      will-change: transform, opacity;
    }
    @keyframes cheer-shard-pop {
      0% {
        transform: translate(50px, -70%) scale(0.5);
        opacity: 1;
      }
      100% {
        transform: translate(calc(50px + var(--dx)), calc(-70% + var(--dy))) scale(0.2);
        opacity: 0;
      }
    }
    .cheer-toast {
      display: none;
      margin: 0;
      padding: 10px 12px;
      border-radius: 10px;
      border: 1px solid rgba(125, 206, 160, 0.55);
      background: rgba(61, 155, 110, 0.16);
      color: #9fe3bf;
      font-size: 13px;
      font-weight: 700;
      text-align: center;
      line-height: 1.4;
    }
    .cheer-toast.open { display: block; }
    .novelist-bar,
    .share-bar {
      appearance: none;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
      width: 100%;
      margin: 0;
      padding: 14px 14px 13px;
      border-radius: 16px;
      border: 1px solid rgba(212, 165, 116, 0.42);
      background:
        linear-gradient(135deg, rgba(212, 165, 116, 0.22) 0%, rgba(90, 58, 36, 0.55) 48%, rgba(42, 32, 22, 0.92) 100%),
        #2a2218;
      color: #f6e8d4;
      font: inherit;
      text-align: left;
      cursor: pointer;
      min-height: 72px;
      box-shadow: inset 0 1px 0 rgba(255, 230, 190, 0.12);
    }
    .share-bar {
      border-color: rgba(61, 155, 110, 0.48);
      background:
        linear-gradient(135deg, rgba(61, 155, 110, 0.28) 0%, rgba(22, 72, 52, 0.72) 48%, rgba(14, 36, 28, 0.96) 100%),
        #143028;
      color: #e8f2ec;
      box-shadow: inset 0 1px 0 rgba(180, 240, 210, 0.12);
    }
    .novelist-bar:focus-visible,
    .share-bar:focus-visible {
      outline: 2px solid #d4a574;
      outline-offset: 2px;
    }
    .share-bar:focus-visible {
      outline-color: #3d9b6e;
    }
    .novelist-bar:active,
    .share-bar:active {
      transform: scale(0.992);
    }
    .novelist-bar-kicker,
    .share-bar-kicker {
      font-size: 11px;
      font-weight: 650;
      letter-spacing: 0.04em;
      color: #e0c29a;
    }
    .share-bar-kicker { color: #9fe3bf; }
    .novelist-bar-title,
    .share-bar-title {
      font-size: 18px;
      font-weight: 800;
      letter-spacing: -0.02em;
      line-height: 1.25;
      color: #fff4e4;
    }
    .share-bar-title { color: #f0faf4; }
    .novelist-bar-row,
    .share-bar-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      width: 100%;
    }
    .novelist-bar-go,
    .share-bar-go {
      flex: 0 0 auto;
      font-size: 12px;
      font-weight: 700;
      color: #2a1c10;
      background: #d4a574;
      border-radius: 999px;
      padding: 6px 10px;
      white-space: nowrap;
    }
    .share-bar-go {
      color: #0c1f16;
      background: #7dcea0;
    }
    a.novelist-bar,
    button.share-bar { text-decoration: none; color: inherit; }
    .share-modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 80;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
      background: rgba(0, 0, 0, 0.62);
    }
    .share-modal-backdrop.open { display: flex; }
    .share-modal {
      width: min(100%, 420px);
      max-height: min(90vh, 640px);
      overflow: auto;
      border-radius: 16px;
      border: 1px solid rgba(61, 155, 110, 0.45);
      background: #12241d;
      padding: 16px 14px 14px;
      color: var(--ink);
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    }
    .share-modal-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 12px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--line);
    }
    .share-modal-head h3 {
      margin: 0;
      font-size: 17px;
      font-weight: 800;
      color: #9fe3bf;
      letter-spacing: -0.02em;
    }
    .share-modal-close {
      appearance: none;
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.04);
      color: var(--muted);
      border-radius: 999px;
      width: 34px;
      height: 34px;
      font: inherit;
      font-size: 18px;
      line-height: 1;
      cursor: pointer;
    }
    .share-modal-close:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .share-methods-label {
      display: block;
      margin: 0 0 8px;
      font-size: 13px;
      font-weight: 700;
      color: #dff5e8;
    }
    .share-methods {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px;
      margin-bottom: 10px;
    }
    .share-method-btn {
      appearance: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      min-height: 92px;
      padding: 10px 6px;
      border-radius: 10px;
      border: 1px solid rgba(61, 155, 110, 0.35);
      background: rgba(61, 155, 110, 0.12);
      color: #dff5e8;
      font: inherit;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      text-align: center;
    }
    .share-method-btn[data-share="sms"] {
      border-color: rgba(120, 150, 220, 0.45);
      background: rgba(80, 100, 180, 0.16);
      color: #c8d4ff;
    }
    .share-method-btn[data-share="copy"] {
      border-color: rgba(232, 242, 236, 0.18);
      background: rgba(255, 255, 255, 0.04);
      color: #e8f2ec;
    }
    .share-method-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .share-method-icon { font-size: 22px; line-height: 1; }
    .share-method-hint {
      font-size: 10px;
      font-weight: 500;
      color: rgba(223, 245, 232, 0.65);
    }
    .share-method-btn[data-share="sms"] .share-method-hint { color: rgba(200, 212, 255, 0.7); }
    .share-method-btn[data-share="copy"] .share-method-hint { color: var(--muted); }
    .share-toast {
      display: none;
      margin: 0 0 10px;
      padding: 10px;
      border-radius: 10px;
      border: 1px solid rgba(125, 206, 160, 0.55);
      background: rgba(61, 155, 110, 0.16);
      color: #9fe3bf;
      font-size: 12px;
      font-weight: 700;
      text-align: center;
      line-height: 1.4;
    }
    .share-toast.open { display: block; }
    .share-preview-wrap {
      margin-bottom: 10px;
      padding: 12px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: #0c1a15;
    }
    .share-preview-label {
      display: block;
      margin-bottom: 6px;
      font-size: 11px;
      font-weight: 700;
      color: var(--muted);
    }
    .share-preview {
      max-height: 110px;
      overflow: auto;
      padding: 10px;
      border-radius: 8px;
      border: 1px solid rgba(255, 255, 255, 0.05);
      background: #163028;
      color: #c5d9cd;
      font-size: 12px;
      line-height: 1.5;
      white-space: pre-wrap;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    }
    .share-qr-wrap {
      text-align: center;
      padding: 8px;
      border-radius: 10px;
      border: 1px dashed rgba(61, 155, 110, 0.35);
      background: rgba(255, 255, 255, 0.02);
    }
    .share-qr-frame {
      display: inline-block;
      padding: 6px;
      border-radius: 8px;
      background: #fff;
    }
    .share-qr-frame img {
      display: block;
      width: 90px;
      height: 90px;
    }
    .status-note {
      margin: 10px 0 0;
      padding: 0 2px;
      color: rgba(155,181,168,0.72);
      font-size: 10px;
      line-height: 1.35;
      font-weight: 400;
    }
    .symptom-ask {
      margin-top: 14px;
      margin-bottom: 4px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      overflow: hidden;
    }
    .symptom-ask.open {
      border-color: rgba(61,155,110,0.4);
      background: #1c4338;
    }
    .symptom-ask-toggle {
      appearance: none;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      text-align: left;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      padding: 14px 12px;
      cursor: pointer;
      min-height: 52px;
    }
    .symptom-ask-toggle:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: -2px;
    }
    .symptom-ask-toggle-text {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }
    .symptom-ask-toggle-text strong {
      margin: 0;
      font-size: 16px;
      font-weight: 700;
      line-height: 1.35;
      letter-spacing: -0.02em;
    }
    .symptom-ask-hint {
      color: var(--muted);
      font-size: 12px;
      font-weight: 500;
      line-height: 1.35;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .symptom-ask-toggle .chev {
      flex: 0 0 auto;
      color: var(--muted);
      font-size: 12px;
      transition: transform 0.15s ease;
    }
    .symptom-ask.open .symptom-ask-toggle .chev {
      transform: rotate(180deg);
      color: var(--accent);
    }
    .symptom-ask-panel {
      display: none;
      padding: 0 12px 12px;
      border-top: 1px solid var(--line);
    }
    .symptom-ask.open .symptom-ask-panel { display: block; }
    .symptom-ask-lead {
      margin: 10px 0 10px;
      padding: 0 2px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }
    .symptom-ask-groups {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin: 0 0 10px;
    }
    .symptom-ask-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .symptom-ask-group-label {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
      line-height: 1.35;
    }
    .symptom-ask-group-label .opt {
      font-weight: 500;
      opacity: 0.85;
    }
    .symptom-ask-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 0;
    }
    .symptom-ask-chips .act-chip {
      font-size: 12px;
      padding: 7px 10px;
      min-height: 34px;
    }
    .symptom-ask-compose {
      margin: 0 0 10px;
      padding: 8px 10px;
      border-radius: 10px;
      border: 1px solid rgba(61,155,110,0.28);
      background: rgba(61,155,110,0.1);
      color: #dff5e8;
      font-size: 12px;
      line-height: 1.4;
      word-break: break-word;
    }
    .symptom-ask-compose.is-empty {
      color: rgba(155,181,168,0.85);
      border-color: var(--line);
      background: rgba(26,58,48,0.35);
    }
    .symptom-ask-row {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .symptom-ask-input {
      width: 100%;
      box-sizing: border-box;
      resize: vertical;
      min-height: 64px;
      max-height: 120px;
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: var(--key);
      color: var(--ink);
      font: inherit;
      font-size: 14px;
      line-height: 1.4;
    }
    .symptom-ask-input:focus {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .symptom-ask-input::placeholder {
      color: var(--muted);
    }
    .symptom-ask-actions {
      display: flex;
      gap: 8px;
    }
    .symptom-ask-btn {
      appearance: none;
      flex: 1;
      border-radius: 12px;
      border: 0;
      padding: 12px 10px;
      font: inherit;
      font-size: 15px;
      font-weight: 700;
      background: var(--accent);
      color: #062016;
      cursor: pointer;
      min-height: 44px;
    }
    .symptom-ask-btn:disabled {
      opacity: 0.55;
      cursor: default;
    }
    .symptom-ask-btn:focus-visible {
      outline: 2px solid #d9f5e6;
      outline-offset: 2px;
    }
    .symptom-ask-mode {
      display: none;
      margin: 10px 0 4px;
      color: var(--accent);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.02em;
    }
    .symptom-ask.has-answer .symptom-ask-mode { display: block; }
    .symptom-ask-answer {
      display: none;
      margin: 0 0 4px;
      padding: 8px 10px;
      border-radius: 10px;
      background: rgba(61,155,110,0.12);
      border: 1px solid rgba(61,155,110,0.28);
      color: var(--ink);
      font-size: 13px;
      line-height: 1.45;
      white-space: pre-wrap;
      word-break: break-word;
    }
    .symptom-ask.has-answer .symptom-ask-answer { display: block; }
    .symptom-ask-answer.is-loading {
      color: var(--muted);
      font-style: italic;
    }
    .symptom-ask-q {
      display: none;
      margin: 0 0 6px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }
    .symptom-ask.has-answer .symptom-ask-q { display: block; }
    .symptom-ask-note {
      margin: 6px 0 0;
      color: rgba(155,181,168,0.72);
      font-size: 10px;
      line-height: 1.35;
    }
    .food-box {
      margin-top: 14px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      overflow: hidden;
    }
    .food-box.open {
      border-color: rgba(61,155,110,0.4);
      background: #1c4338;
    }
    .food-guide-toggle {
      appearance: none;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      text-align: left;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      padding: 14px 12px;
      cursor: pointer;
      min-height: 52px;
    }
    .food-guide-toggle:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: -2px;
    }
    .food-guide-toggle-text {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }
    .food-guide-toggle-text strong {
      margin: 0;
      font-size: 16px;
      font-weight: 700;
      line-height: 1.35;
      letter-spacing: -0.02em;
    }
    .food-guide-hint {
      color: var(--muted);
      font-size: 12px;
      font-weight: 500;
      line-height: 1.3;
    }
    .food-guide-toggle .chev {
      flex: 0 0 auto;
      color: var(--muted);
      font-size: 12px;
      transition: transform 0.15s ease;
    }
    .food-box.open .food-guide-toggle .chev {
      transform: rotate(180deg);
      color: var(--accent);
    }
    .food-guide-panel {
      display: none;
      padding: 0 12px 12px;
      border-top: 1px solid var(--line);
    }
    .food-box.open .food-guide-panel { display: block; }
    .food-lead {
      margin: 10px 0 12px;
      padding: 0 2px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }
    .food-empty {
      margin: 0 0 10px;
      padding: 10px;
      border-radius: 10px;
      border: 1px dashed rgba(155,181,168,0.35);
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }
    .food-box.has-data .food-empty { display: none; }
    .food-bars { display: flex; flex-direction: column; gap: 8px; }
    .food-bar {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--key);
      overflow: hidden;
    }
    .food-bar.open {
      border-color: rgba(61,155,110,0.4);
      background: #1c4338;
    }
    .food-bar-toggle {
      appearance: none;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      text-align: left;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      font-size: 15px;
      font-weight: 700;
      padding: 14px 12px;
      cursor: pointer;
      min-height: 48px;
    }
    .food-bar-toggle:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: -2px;
    }
    .food-bar-toggle .chev {
      flex: 0 0 auto;
      color: var(--muted);
      font-size: 12px;
      transition: transform 0.15s ease;
    }
    .food-bar.open .food-bar-toggle .chev { transform: rotate(180deg); color: var(--accent); }
    .food-panel {
      display: none;
      padding: 0 12px 12px;
      border-top: 1px solid var(--line);
    }
    .food-bar.open .food-panel { display: block; }
    .food-panel ul {
      margin: 10px 0 0;
      padding: 0 0 0 18px;
      color: var(--ink);
      font-size: 13px;
      line-height: 1.55;
    }
    .food-panel li { margin: 0 0 6px; }
    .food-panel .panel-empty {
      margin: 10px 0 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }
    .food-note {
      margin: 10px 0 0;
      padding: 0 2px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.4;
    }
    .food-bar-toggle-text {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
      flex: 1 1 auto;
    }
    .food-bar-toggle-text > span:first-child {
      font-weight: 700;
    }
    .food-wh-hint {
      color: var(--muted);
      font-size: 12px;
      font-weight: 500;
      line-height: 1.3;
    }
    .food-wh-add {
      display: flex;
      gap: 8px;
      margin-top: 10px;
      align-items: stretch;
    }
    .food-wh-input {
      flex: 1 1 auto;
      min-width: 0;
      appearance: none;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: rgba(15, 31, 26, 0.55);
      color: var(--ink);
      font: inherit;
      font-size: 14px;
      padding: 10px 12px;
      min-height: 44px;
    }
    .food-wh-input:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .food-wh-add-btn,
    .food-wh-import {
      appearance: none;
      border: 1px solid rgba(61, 155, 110, 0.45);
      border-radius: 10px;
      background: rgba(61, 155, 110, 0.18);
      color: #dff5e8;
      font: inherit;
      font-size: 13px;
      font-weight: 650;
      cursor: pointer;
      min-height: 44px;
      padding: 8px 12px;
      white-space: nowrap;
    }
    .food-wh-add-btn:active,
    .food-wh-import:active {
      transform: scale(0.98);
    }
    .food-wh-import {
      display: block;
      width: 100%;
      margin-top: 8px;
      background: rgba(26, 58, 48, 0.65);
      border-color: var(--line);
      color: var(--muted);
      font-weight: 600;
    }
    .food-wh-list {
      list-style: none;
      margin: 12px 0 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .food-wh-list[hidden] { display: none; }
    .food-wh-item {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      padding: 10px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: rgba(15, 31, 26, 0.4);
    }
    .food-wh-item-main {
      flex: 1 1 auto;
      min-width: 0;
    }
    .food-wh-item-top {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
      margin-bottom: 4px;
    }
    .food-wh-name {
      font-size: 14px;
      font-weight: 650;
      color: var(--ink);
      line-height: 1.3;
    }
    .food-wh-chip {
      appearance: none;
      border: 1px solid transparent;
      border-radius: 999px;
      font: inherit;
      font-size: 11px;
      font-weight: 700;
      padding: 3px 8px;
      line-height: 1.2;
      cursor: default;
    }
    .food-wh-chip.is-good {
      background: rgba(61, 155, 110, 0.22);
      border-color: rgba(61, 155, 110, 0.55);
      color: #b8f0d0;
    }
    .food-wh-chip.is-caution {
      background: rgba(196, 120, 54, 0.22);
      border-color: rgba(214, 148, 72, 0.55);
      color: #ffd7a8;
    }
    .food-wh-chip.is-ok {
      background: rgba(155, 181, 168, 0.14);
      border-color: rgba(155, 181, 168, 0.35);
      color: var(--muted);
    }
    .food-wh-reason {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }
    .food-wh-remove {
      appearance: none;
      flex: 0 0 auto;
      width: 36px;
      height: 36px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: transparent;
      color: var(--muted);
      font: inherit;
      font-size: 16px;
      cursor: pointer;
      line-height: 1;
    }
    .food-wh-remove:active { color: #ffd7a8; }
    .yesterday-gap-hint {
      margin: 14px 0 0;
      padding: 10px 12px;
      border-radius: 12px;
      background: rgba(22, 48, 40, 0.72);
      border: 1px solid var(--line);
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }
    .meals-box {
      margin-top: 14px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 14px 12px 12px;
    }
    .meals-box > h2 {
      margin: 0 0 4px;
      padding: 0 4px;
      font-size: 17px;
      font-weight: 700;
      line-height: 1.3;
    }
    .meals-lead {
      margin: 0 0 12px;
      padding: 0 4px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }
    .meals-box .keys {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .meals-box .key strong {
      font-size: 14px;
      line-height: 1.3;
      word-break: keep-all;
    }
    .meals-note {
      margin: 8px 0 0;
      padding: 0 4px;
      color: rgba(155,181,168,0.72);
      font-size: 10px;
      line-height: 1.35;
    }
    .sheet-meals {
      display: none;
      flex-direction: column;
      gap: 10px;
      flex: 1 1 0;
      min-height: 0;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      touch-action: pan-y;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .sheet-meals::-webkit-scrollbar { width: 0; height: 0; }
    .sheet-backdrop.mode-meals .sheet-meals { display: flex; }
    .sheet-backdrop.mode-meals .sheet-single,
    .sheet-backdrop.mode-meals .sheet-profile,
    .sheet-backdrop.mode-meals .sheet-meds { display: none; }
    .sheet-backdrop.mode-profile .sheet-meals,
    .sheet-backdrop.mode-meds .sheet-meals { display: none; }
    .meals-field {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .meals-field > label {
      display: flex;
      align-items: baseline;
      flex-wrap: wrap;
      gap: 8px;
      margin: 2px 0 4px;
      color: var(--ink);
      font-size: 22px;
      font-weight: 800;
      letter-spacing: -0.03em;
      line-height: 1.2;
    }
    .meals-field > label > span[data-i18n] {
      color: var(--ink);
      font-size: inherit;
      font-weight: inherit;
    }
    .meals-field-kcal {
      color: var(--accent);
      font-size: 13px;
      font-weight: 650;
      letter-spacing: 0;
    }
    .meals-chip-hint {
      margin: 0;
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
      line-height: 1.3;
    }
    .meals-food-chips {
      margin: 0 0 2px;
    }
    .meals-menu-wrap {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .meals-menu-wrap .act-chips {
      margin: 0;
    }
    .meals-field .fixed-menu-guide {
      margin: 2px 0 4px;
    }
    .meals-field .fixed-menu-empty {
      margin: 0 0 4px;
    }
    .meals-fixed-global {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 10px 10px 8px;
      border-radius: 12px;
      border: 1px solid rgba(61,155,110,0.35);
      background: rgba(61,155,110,0.08);
    }
    .meals-fixed-global-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .meals-fixed-global-head strong {
      font-size: 14px;
      font-weight: 800;
      color: var(--ink);
    }
    .fixed-menu-manage-btn,
    .fixed-menu-add-btn {
      appearance: none;
      border: 2px solid rgba(232,242,236,0.35);
      background: #1a3328;
      color: var(--ink);
      font: inherit;
      font-size: 12px;
      font-weight: 700;
      padding: 8px 10px;
      border-radius: 10px;
      cursor: pointer;
      min-height: 40px;
      white-space: nowrap;
    }
    .fixed-menu-manage-btn[aria-pressed="true"] {
      border-color: #ffb4a8;
      background: #5a1d18;
      color: #fff4f2;
    }
    .fixed-menu-guide {
      margin: 0;
      color: rgba(210,230,218,0.88);
      font-size: 11px;
      font-weight: 600;
      line-height: 1.4;
      word-break: keep-all;
    }
    .meals-default-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-top: 2px;
    }
    .meals-default-head .meals-chip-hint {
      margin: 0;
    }
    .fixed-menu-chips {
      margin: 0;
    }
    .fixed-menu-empty {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
      line-height: 1.35;
    }
    .fixed-menu-empty[hidden] { display: none; }
    .act-chip.fixed-menu-chip.is-remove-mode {
      border-color: #ffb4a8;
    }
    .fixed-chip-trash {
      appearance: none;
      border: 2px solid #ffb4a8;
      background: #8b2a22;
      color: #fff;
      font: inherit;
      font-size: 12px;
      font-weight: 800;
      min-height: 40px;
      padding: 8px 10px;
      border-radius: 10px;
      cursor: pointer;
      line-height: 1.2;
      flex: 0 0 auto;
    }
    .meals-note-row {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .meals-note-row .meals-note-input {
      width: 100%;
    }
    .fixed-menu-add-btn {
      width: 100%;
      border-color: rgba(61,155,110,0.55);
      background: #1e4d38;
      color: #e8fff3;
      font-size: 13px;
    }
    .fixed-menu-add-btn:active {
      transform: scale(0.98);
    }
    .meals-field > label.meals-note-label,
    .meals-note-label {
      display: block;
      margin: 6px 0 0;
      color: var(--muted);
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0;
      line-height: 1.35;
    }
    .meals-field .meals-note-input,
    .meals-field textarea {
      width: 100%;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: var(--key);
      color: var(--ink);
      font: inherit;
      font-size: 14px;
      line-height: 1.4;
      padding: 10px 12px;
      min-height: 44px;
      box-sizing: border-box;
    }
    .meals-field .meals-note-input {
      resize: none;
    }
    .meals-field textarea {
      min-height: 52px;
      resize: vertical;
    }
    .meals-field .meals-note-input:focus,
    .meals-field textarea:focus {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .act-block .meals-note-input {
      width: 100%;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: var(--key);
      color: var(--ink);
      font: inherit;
      font-size: 14px;
      line-height: 1.4;
      padding: 10px 12px;
      min-height: 44px;
      box-sizing: border-box;
    }
    .act-block .meals-note-input:focus {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .meals-sheet-total {
      margin-top: 2px;
      padding: 10px 12px;
      border-radius: 12px;
      background: rgba(61,155,110,0.12);
      border: 1px solid rgba(61,155,110,0.28);
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 10px;
    }
    .meals-sheet-total .label {
      font-size: 14px;
      font-weight: 700;
    }
    .meals-sheet-total .value {
      color: var(--accent);
      font-size: 16px;
      font-weight: 700;
      white-space: nowrap;
    }
    .activity-box {
      margin-top: 14px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 14px 12px 12px;
    }
    .activity-box .keys {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .activity-box .key strong {
      font-size: 14px;
      line-height: 1.3;
      word-break: keep-all;
    }
    .sheet-activity {
      display: none;
      flex-direction: column;
      gap: 12px;
      flex: 1 1 0;
      min-height: 0;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      touch-action: pan-y;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .sheet-activity::-webkit-scrollbar { width: 0; height: 0; }
    .sheet-backdrop.mode-activity .sheet-activity { display: flex; }
    .sheet-backdrop.mode-activity .sheet-single,
    .sheet-backdrop.mode-activity .sheet-profile,
    .sheet-backdrop.mode-activity .sheet-meds,
    .sheet-backdrop.mode-activity .sheet-meals { display: none; }
    .sheet-backdrop.mode-meals .sheet-activity,
    .sheet-backdrop.mode-profile .sheet-activity,
    .sheet-backdrop.mode-meds .sheet-activity { display: none; }
    .act-block {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--line);
    }
    .act-block:last-of-type { border-bottom: 0; padding-bottom: 0; }
    .act-block-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
    }
    .act-block-head strong {
      font-size: 14px;
      font-weight: 700;
    }
    .act-block-title {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 4px 6px;
      min-width: 0;
    }
    .act-block-guide {
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
      line-height: 1.3;
    }
    .act-block-kcal {
      color: var(--accent);
      font-size: 12px;
      font-weight: 600;
      white-space: nowrap;
    }
    .act-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .act-chip {
      appearance: none;
      border: 2px solid rgba(232,242,236,0.28);
      background: #142820;
      color: var(--muted);
      font: inherit;
      font-size: 13px;
      font-weight: 600;
      padding: 8px 12px;
      border-radius: 999px;
      cursor: pointer;
      min-height: 40px;
      line-height: 1.25;
      box-shadow: none;
      transform: scale(1);
      transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease,
        box-shadow 0.12s ease, transform 0.12s ease;
    }
    .act-chip[aria-pressed="true"] {
      border: 3px solid #ffffff;
      background: #0b7a4a;
      color: #ffffff;
      font-weight: 800;
      box-shadow: 0 3px 0 #064028, 0 8px 16px rgba(0, 0, 0, 0.4);
      transform: scale(1.06);
      z-index: 1;
    }
    .act-chip[aria-pressed="true"]::before {
      content: "✓ ";
      font-weight: 900;
      letter-spacing: -0.02em;
    }
    .act-chip:focus-visible {
      outline: 3px solid #f2fff8;
      outline-offset: 2px;
    }
    .act-mode-hint {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
      line-height: 1.35;
    }
    .act-mode-hint strong {
      color: #c9e6d8;
      font-weight: 700;
    }
    .act-path {
      display: flex;
      flex-direction: column;
      gap: 6px;
      border-radius: 12px;
      padding: 8px;
      border: 1px solid transparent;
      transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }
    .act-path-label {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.02em;
    }
    .act-block[data-input-mode="preset"] .act-path-preset,
    .act-block[data-input-mode="adjust"] .act-path-adjust,
    .act-block[data-input-mode="steps"] .act-path-steps {
      border-color: rgba(61,155,110,0.35);
      background: rgba(28,67,56,0.28);
    }
    .act-block[data-input-mode="preset"] .act-path-preset .act-path-label,
    .act-block[data-input-mode="adjust"] .act-path-adjust .act-path-label,
    .act-block[data-input-mode="steps"] .act-path-steps .act-path-label {
      color: var(--accent);
    }
    .act-block[data-input-mode="preset"] .act-path-adjust,
    .act-block[data-input-mode="preset"] .act-path-steps,
    .act-block[data-input-mode="adjust"] .act-path-preset,
    .act-block[data-input-mode="adjust"] .act-path-steps,
    .act-block[data-input-mode="steps"] .act-path-preset,
    .act-block[data-input-mode="steps"] .act-path-adjust {
      opacity: 0.4;
      filter: grayscale(0.15);
    }
    .act-block[data-input-mode="preset"] .act-path-adjust::after,
    .act-block[data-input-mode="preset"] .act-path-steps::after,
    .act-block[data-input-mode="adjust"] .act-path-preset::after,
    .act-block[data-input-mode="adjust"] .act-path-steps::after,
    .act-block[data-input-mode="steps"] .act-path-preset::after,
    .act-block[data-input-mode="steps"] .act-path-adjust::after {
      content: "누르면 이 방식으로 바뀜";
      display: block;
      margin-top: 2px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 600;
    }
    .act-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .act-row .muted {
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
    }
    .act-extras {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .act-extra-row {
      appearance: none;
      width: 100%;
      text-align: left;
      border: 1px solid rgba(61,155,110,0.35);
      border-radius: 10px;
      background: #1c4338;
      color: inherit;
      font: inherit;
      font-size: 13px;
      padding: 10px 12px;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      gap: 8px;
    }
    .act-extra-row span:last-child {
      color: var(--muted);
      font-size: 12px;
      white-space: nowrap;
    }
    .act-sheet-total {
      margin-top: 2px;
      padding: 10px 12px;
      border-radius: 12px;
      background: rgba(61,155,110,0.12);
      border: 1px solid rgba(61,155,110,0.28);
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 10px;
    }
    .act-sheet-total .label { font-size: 13px; font-weight: 600; color: var(--muted); }
    .act-sheet-total .value { font-size: 16px; font-weight: 700; color: var(--accent); }
    .activity-note {
      margin: 8px 0 0;
      padding: 0 4px;
      color: rgba(155,181,168,0.72);
      font-size: 10px;
      line-height: 1.35;
    }
    .act-add-btn {
      appearance: none;
      width: 100%;
      border: 1px dashed rgba(155,181,168,0.45);
      border-radius: 12px;
      background: transparent;
      color: var(--muted);
      font: inherit;
      font-size: 14px;
      font-weight: 600;
      padding: 12px;
      cursor: pointer;
      min-height: 44px;
    }
    .act-add-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    .vitals-status-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 14px;
      margin-bottom: 4px;
      align-items: stretch;
    }
    .vitals-status-row .vitals-box,
    .vitals-status-row .status-block {
      margin-top: 0;
      margin-bottom: 0;
      min-width: 0;
      height: 100%;
    }
    .vitals-box {
      margin-top: 14px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 12px;
    }
    .vitals-status-row .vitals-box {
      padding: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    .vitals-status-row .vitals-box-lead { display: none; }
    .vitals-status-row .vitals-box .keys {
      flex: 1;
      display: flex;
      min-height: 0;
    }
    .vitals-status-row .vitals-box .key {
      flex: 1;
      width: 100%;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
      padding: 14px 12px;
      min-height: 52px;
      align-items: flex-start;
    }
    .vitals-status-row .status-toggle {
      height: 100%;
      align-items: flex-start;
    }
    .vitals-status-row .status-toggle-text strong,
    .vitals-status-row .vitals-box .key strong {
      font-size: 14px;
    }
    .vitals-status-row .status-hint,
    .vitals-status-row .vitals-box .key .hint,
    .vitals-status-row .vitals-box .key .preview {
      white-space: normal;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    /* 현재 내몸 상태 열면 한 줄 전체로 크게 */
    .vitals-status-row.is-status-open,
    .vitals-status-row:has(.status-block.open) {
      grid-template-columns: 1fr;
    }
    .vitals-status-row.is-status-open .vitals-box,
    .vitals-status-row:has(.status-block.open) .vitals-box {
      display: none;
    }
    .vitals-status-row .status-block.open {
      grid-column: 1 / -1;
      height: auto;
    }
    .vitals-status-row .status-block.open .status-toggle {
      height: auto;
      align-items: center;
    }
    .vitals-status-row .status-block.open .status-toggle-text strong {
      font-size: 16px;
    }
    .vitals-status-row .status-block.open .status-hint {
      display: block;
      -webkit-line-clamp: unset;
      white-space: normal;
      overflow: visible;
      font-size: 13px;
      line-height: 1.4;
    }
    .vitals-status-row .status-block.open .status-panel {
      padding: 12px 14px 16px;
    }
    .vitals-status-row .status-block.open .status-filled {
      font-size: 15px;
      line-height: 1.55;
    }
    .vitals-status-row .status-block.open .status-empty {
      font-size: 14px;
      padding: 14px 12px;
    }
    .vitals-box-lead {
      margin: 0 0 10px;
      padding: 0 2px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 650;
      line-height: 1.45;
    }
    .vitals-box .keys { display: grid; gap: 8px; }
    .vitals-backdrop {
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.55);
      display: none;
      align-items: stretch;
      padding-top: max(10px, env(safe-area-inset-top, 0px));
      z-index: 70;
    }
    .vitals-backdrop.open { display: flex; }
    .vitals-sheet {
      width: 100%;
      flex: 1 1 auto;
      background: #142820;
      border-radius: 18px 18px 0 0;
      border: 1px solid var(--line);
      border-bottom: 0;
      padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
      display: flex;
      flex-direction: column;
      gap: 10px;
      overflow: hidden;
    }
    .vitals-sheet-scroll {
      flex: 1 1 auto;
      min-height: 0;
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .vitals-tabs { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
    .vitals-tab {
      appearance: none;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 8px 12px;
      background: rgba(26,58,48,0.65);
      color: var(--ink);
      font: inherit;
      font-size: 12px;
      font-weight: 800;
      cursor: pointer;
    }
    .vitals-tab.on {
      background: rgba(61,155,110,0.28);
      border-color: rgba(61,155,110,0.55);
      color: #dff5e8;
    }
    .vitals-panel[hidden] { display: none !important; }
    .vitals-opt {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 10px 0;
      border-bottom: 1px solid var(--line);
    }
    .vitals-opt:last-of-type { border-bottom: 0; }
    .vitals-opt-label { font-size: 14px; font-weight: 750; }
    .vitals-opt-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 500; }
    .vitals-toggle {
      flex: 0 0 auto;
      width: 46px; height: 28px;
      border-radius: 999px;
      border: 0;
      background: rgba(232,242,236,0.18);
      position: relative;
      cursor: pointer;
    }
    .vitals-toggle.on { background: var(--accent); }
    .vitals-toggle::after {
      content: "";
      position: absolute;
      top: 3px; left: 3px;
      width: 22px; height: 22px;
      border-radius: 50%;
      background: #fff;
      transition: left 0.15s;
    }
    .vitals-toggle.on::after { left: 21px; }
    .vitals-block {
      padding: 12px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: rgba(26,58,48,0.35);
    }
    .vitals-block h3 {
      margin: 0 0 8px;
      font-size: 14px;
      font-weight: 800;
      color: #dff5e8;
    }
    .vitals-row {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 8px;
      margin: 0 0 10px;
    }
    .vitals-field-label {
      display: block;
      margin: 0 0 4px;
      font-size: 12px;
      font-weight: 700;
      color: #c5d9cd;
    }
    .vitals-num {
      width: 100%;
      padding: 11px 8px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: rgba(26,58,48,0.65);
      color: var(--ink);
      font: inherit;
      font-size: 18px;
      font-weight: 750;
      text-align: center;
    }
    .vitals-hint {
      margin: 0 0 10px;
      padding: 10px 12px;
      border-radius: 10px;
      background: rgba(61,155,110,0.14);
      border: 1px solid rgba(125,206,160,0.35);
      font-size: 13px;
      font-weight: 650;
      line-height: 1.4;
    }
    .vitals-hint.warn {
      background: rgba(232,192,122,0.12);
      border-color: rgba(232,192,122,0.4);
      color: #f0e0b8;
    }
    .vitals-hint.alert {
      background: rgba(240,168,160,0.12);
      border-color: rgba(240,168,160,0.4);
      color: #f6d6d6;
    }
    .vitals-hint[hidden] { display: none !important; }
    .vitals-note {
      margin: 0 0 8px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }
    .vitals-actions { display: flex; gap: 8px; }
    .vitals-actions .btn-ghost,
    .vitals-actions .btn-primary {
      flex: 1;
      appearance: none;
      border: 0;
      border-radius: 12px;
      padding: 12px;
      font: inherit;
      font-size: 14px;
      font-weight: 800;
      cursor: pointer;
    }
    .vitals-actions .btn-primary { background: var(--accent); color: #fff; }
    .vitals-actions .btn-ghost {
      background: transparent;
      color: #9fb9ac;
      border: 1px solid var(--line);
    }
    .vitals-log-list { margin: 0; padding: 0; list-style: none; }
    .vitals-log-list li {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 8px 0;
      border-bottom: 1px solid var(--line);
      font-size: 13px;
    }
    .vitals-log-list li:last-child { border-bottom: 0; }
    .vitals-log-list .t { color: var(--muted); flex: 1; }
    .vitals-log-list .v { font-weight: 750; text-align: right; }
    .vitals-log-list button.del {
      appearance: none;
      border: 0;
      background: transparent;
      color: #f0a8a0;
      font: inherit;
      font-size: 12px;
      font-weight: 750;
      cursor: pointer;
      padding: 4px 6px;
    }
    .vitals-chart {
      height: 120px;
      border-radius: 10px;
      background: rgba(0,0,0,0.18);
      margin: 0 0 8px;
      overflow: hidden;
    }
    .vitals-chart svg { width: 100%; height: 100%; display: block; }
    #labroom-chart {
      height: 168px;
    }
    .labroom-metric-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 0 0 8px;
    }
    .labroom-metric-chips .act-chip {
      font-size: 12px;
      padding: 7px 9px;
    }
    .labroom-axis {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      margin: 0 0 8px;
      font-size: 11px;
      color: var(--muted);
    }
    .labroom-point-legend {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin: 0 0 10px;
    }
    .labroom-point-legend-row {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 10px;
      padding: 7px 10px;
      border-radius: 8px;
      border: 1px solid rgba(232, 242, 236, 0.12);
      background: rgba(26, 58, 48, 0.45);
      font-size: 13px;
      line-height: 1.35;
    }
    .labroom-point-legend-row .d {
      font-weight: 700;
      color: var(--ink);
    }
    .labroom-point-legend-row .v {
      font-weight: 800;
      color: #7dcea0;
      text-align: right;
    }
    .labroom-opinion {
      margin: 0;
      padding: 12px 12px;
      border-radius: 12px;
      background: rgba(61, 155, 110, 0.14);
      border: 1px solid rgba(125, 206, 160, 0.35);
      color: var(--ink);
      font-size: 13px;
      font-weight: 650;
      line-height: 1.5;
    }
    .labroom-opinion.warn {
      background: rgba(232, 192, 122, 0.12);
      border-color: rgba(232, 192, 122, 0.4);
      color: #f0e0b8;
    }
    .labroom-opinion.alert {
      background: rgba(240, 168, 160, 0.12);
      border-color: rgba(240, 168, 160, 0.4);
      color: #f6d6d6;
    }
    .labroom-opinion p {
      margin: 0 0 6px;
    }
    .labroom-opinion p:last-child { margin-bottom: 0; }
    .labroom-opinion-title {
      font-weight: 800;
      margin-bottom: 8px !important;
    }
    .labroom-opinion-foot {
      margin-top: 8px !important;
      font-size: 12px;
      opacity: 0.92;
    }
    .lab-history-opinion {
      margin: 0;
      padding: 10px 10px;
      border-radius: 10px;
      background: rgba(61, 155, 110, 0.12);
      border: 1px solid rgba(125, 206, 160, 0.28);
      color: var(--ink);
      font-size: 12px;
      font-weight: 650;
      line-height: 1.45;
    }
    .lab-history-opinion.warn {
      background: rgba(232, 192, 122, 0.12);
      border-color: rgba(232, 192, 122, 0.35);
      color: #f0e0b8;
    }
    .lab-history-opinion.alert {
      background: rgba(240, 168, 160, 0.12);
      border-color: rgba(240, 168, 160, 0.35);
      color: #f6d6d6;
    }
    .labroom-open-input {
      appearance: none;
      width: 100%;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: var(--accent);
      color: #0b1a14;
      font: inherit;
      font-size: 14px;
      font-weight: 800;
      padding: 12px 10px;
      cursor: pointer;
      margin: 0 0 4px;
    }
    .labroom-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .vitals-clinic {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }
    .vitals-clinic th, .vitals-clinic td {
      border-bottom: 1px solid var(--line);
      padding: 7px 4px;
      text-align: left;
    }
    .vitals-clinic th { color: var(--muted); font-weight: 700; }
    .vitals-clinic td { font-weight: 650; }
    .records-vitals {
      margin: 0 0 16px;
      padding-bottom: 14px;
      border-bottom: 1px solid var(--line);
    }
    .kcal-chart {
      margin-top: 14px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 14px 12px 12px;
    }
    .kcal-chart > h2 {
      margin: 0 0 4px;
      padding: 0 4px;
      font-size: 16px;
      font-weight: 700;
      line-height: 1.35;
      letter-spacing: -0.02em;
    }
    .kcal-chart-lead {
      margin: 0 0 12px;
      padding: 0 4px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }
    .kcal-chart-empty {
      margin: 0 0 8px;
      padding: 12px 10px;
      border-radius: 12px;
      border: 1px dashed rgba(155,181,168,0.35);
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }
    .kcal-chart.has-data .kcal-chart-empty { display: none; }
    .kcal-chart-body { display: none; }
    .kcal-chart.has-data .kcal-chart-body { display: block; }
    .kcal-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 14px;
      margin: 0 0 10px;
      padding: 0 2px;
      font-size: 12px;
      font-weight: 600;
      color: var(--muted);
    }
    .kcal-legend span {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .kcal-swatch {
      display: inline-block;
      width: 10px;
      height: 10px;
      border-radius: 2px;
      flex: 0 0 auto;
      font-style: normal;
    }
    .kcal-swatch.intake { background: #e0b070; }
    .kcal-swatch.burn { background: var(--accent); }
    .kcal-month-plot {
      display: grid;
      grid-template-columns: repeat(30, minmax(0, 1fr));
      align-items: end;
      gap: 3px;
      height: 148px;
      padding: 10px 4px 4px;
      border-radius: 12px;
      background:
        linear-gradient(180deg, transparent 24.5%, rgba(155,181,168,0.12) 25%, transparent 25.5%),
        linear-gradient(180deg, transparent 49.5%, rgba(155,181,168,0.16) 50%, transparent 50.5%),
        linear-gradient(180deg, transparent 74.5%, rgba(155,181,168,0.12) 75%, transparent 75.5%),
        rgba(0,0,0,0.22);
      border: 1px solid var(--line);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    }
    .kcal-day-col {
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      align-items: stretch;
      gap: 1px;
      min-width: 0;
      height: 100%;
      padding: 0 0 2px;
    }
    .kcal-day-col.is-empty .kcal-day-pair {
      opacity: 0.28;
    }
    .kcal-day-pair {
      display: flex;
      align-items: flex-end;
      justify-content: center;
      gap: 1.5px;
      flex: 1 1 auto;
      min-height: 0;
    }
    .kcal-day-bar {
      width: 100%;
      max-width: 6px;
      min-height: 0;
      border-radius: 2px 2px 0 0;
      background: rgba(155,181,168,0.14);
    }
    .kcal-day-bar.intake {
      background: linear-gradient(180deg, #f0c488 0%, #e0b070 45%, #b8843a 100%);
      box-shadow: 0 0 0 0.5px rgba(224,176,112,0.35);
    }
    .kcal-day-bar.burn {
      background: linear-gradient(180deg, #4cb884 0%, #3d9b6e 45%, #2d7a56 100%);
      box-shadow: 0 0 0 0.5px rgba(61,155,110,0.4);
    }
    .kcal-day-bar.has-val { min-height: 3px; }
    .kcal-axis {
      display: flex;
      justify-content: space-between;
      margin-top: 6px;
      padding: 0 2px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: -0.01em;
    }
    .kcal-yesterday-summary {
      margin-top: 12px;
      padding: 10px 12px;
      border-radius: 12px;
      background: rgba(232,242,236,0.06);
      border: 1px solid var(--line);
      display: grid;
      gap: 6px;
      font-size: 13px;
      font-weight: 600;
      line-height: 1.4;
      color: var(--ink);
    }
    .kcal-yesterday-summary .row {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 10px;
    }
    .kcal-yesterday-summary .intake { color: #e0b070; }
    .kcal-yesterday-summary .burn { color: var(--accent); }
    .kcal-yesterday-summary .net { color: var(--ink); }
    .kcal-chart-note {
      margin: 10px 0 0;
      padding: 0 4px;
      color: rgba(155,181,168,0.72);
      font-size: 10px;
      line-height: 1.35;
    }
    .week-brief {
      margin-top: 14px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      overflow: hidden;
    }
    .week-brief.open {
      border-color: rgba(61,155,110,0.4);
      background: #1c4338;
    }
    .week-brief-toggle {
      appearance: none;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      text-align: left;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      padding: 14px 12px;
      cursor: pointer;
      min-height: 52px;
    }
    .week-brief-toggle:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: -2px;
    }
    .week-brief-toggle-text {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }
    .week-brief-toggle-text strong {
      margin: 0;
      font-size: 16px;
      font-weight: 700;
      line-height: 1.35;
      letter-spacing: -0.02em;
    }
    .week-brief-hint {
      color: var(--muted);
      font-size: 12px;
      font-weight: 500;
      line-height: 1.35;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .week-brief-toggle .chev {
      flex: 0 0 auto;
      color: var(--muted);
      font-size: 12px;
      transition: transform 0.15s ease;
    }
    .week-brief.open .week-brief-toggle .chev {
      transform: rotate(180deg);
      color: var(--accent);
    }
    .week-brief-panel {
      display: none;
      padding: 0 12px 12px;
      border-top: 1px solid var(--line);
    }
    .week-brief.open .week-brief-panel { display: block; }
    .week-brief-modes {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin: 10px 0 0;
    }
    .week-brief-mode {
      appearance: none;
      border-radius: 10px;
      border: 2px solid rgba(232,242,236,0.28);
      background: #142820;
      color: var(--muted);
      font: inherit;
      font-size: 14px;
      font-weight: 650;
      line-height: 1.3;
      padding: 9px 10px;
      cursor: pointer;
      min-height: 42px;
    }
    .week-brief-mode[aria-pressed="true"] {
      border-color: #ffffff;
      background: #0b7a4a;
      color: #ffffff;
      font-weight: 800;
      box-shadow: 0 2px 0 #064028;
    }
    .week-brief-mode:focus-visible {
      outline: 3px solid #f2fff8;
      outline-offset: 2px;
    }
    .week-brief-range {
      margin: 10px 0 10px;
      padding: 0 2px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }
    .week-brief-empty {
      margin: 0;
      padding: 12px 10px;
      border-radius: 12px;
      border: 1px dashed rgba(155,181,168,0.35);
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }
    .week-brief.has-data .week-brief-empty { display: none; }
    .week-brief-body { display: none; }
    .week-brief.has-data .week-brief-body { display: block; }
    .week-brief-lines {
      margin: 0;
      padding: 0;
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .week-brief-lines li {
      margin: 0;
      padding: 8px 10px;
      border-radius: 10px;
      background: rgba(0,0,0,0.18);
      border: 1px solid rgba(232,242,236,0.08);
      color: var(--ink);
      font-size: 13px;
      line-height: 1.4;
    }
    .week-brief-lines li strong {
      display: block;
      margin: 0 0 2px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 650;
      letter-spacing: 0.02em;
    }
    .week-brief-note {
      margin: 10px 0 0;
      padding: 0 2px;
      color: rgba(155,181,168,0.72);
      font-size: 10px;
      line-height: 1.35;
    }
    .nav {
      position: fixed; left: 0; right: 0; bottom: 0;
      z-index: 50;
      display: grid; grid-template-columns: repeat(4, 1fr);
      gap: 4px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
      background: rgba(15,31,26,0.96); border-top: 1px solid var(--line);
      backdrop-filter: blur(8px);
      pointer-events: auto;
    }
    .nav button {
      appearance: none; border: 0; background: transparent; color: var(--muted);
      font-size: 12px; padding: 8px 4px; border-radius: 10px;
      cursor: pointer;
      pointer-events: auto;
      -webkit-tap-highlight-color: rgba(61,155,110,0.25);
    }
    .nav button.active { color: var(--accent); background: rgba(61,155,110,0.12); }
    .sheet-backdrop {
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.55);
      display: none;
      align-items: flex-end;
      z-index: 60; /* nav(50)보다 위 — 저장 버튼이 하단 메뉴에 가리지 않게 */
    }
    .sheet-backdrop.open { display: flex; }
    .sheet {
      width: 100%;
      max-height: min(92vh, 720px);
      background: #142820;
      border-radius: 18px 18px 0 0;
      border: 1px solid var(--line);
      border-bottom: 0;
      padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
      display: flex;
      flex-direction: column;
      gap: 10px;
      overflow: hidden;
    }
    /* 긴 입력 시트: 화면 거의 전체로 올려서 저장이 항상 보이게 */
    .sheet-backdrop.mode-meals,
    .sheet-backdrop.mode-activity,
    .sheet-backdrop.mode-profile,
    .sheet-backdrop.mode-meds {
      align-items: stretch;
      /* 컴퓨터(safe-area 0)에서 위 10px 틈+둥근 모서리가 박스 2중처럼 보임 → 안전영역만 */
      padding-top: env(safe-area-inset-top, 0px);
    }
    .sheet-backdrop.mode-meals .sheet,
    .sheet-backdrop.mode-activity .sheet,
    .sheet-backdrop.mode-profile .sheet,
    .sheet-backdrop.mode-meds .sheet {
      height: auto;
      flex: 1 1 auto;
      max-height: none;
      border-radius: 0;
      border-left: 0;
      border-right: 0;
      border-top: 0;
    }
    .sheet-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-shrink: 0;
    }
    .sheet-head h2 {
      margin: 0;
      font-size: 17px;
      font-weight: 700;
    }
    .sheet-close {
      appearance: none;
      border: 0;
      background: transparent;
      color: var(--muted);
      font-size: 15px;
      padding: 6px 4px;
      cursor: pointer;
    }
    .sheet-help {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
      flex-shrink: 0;
    }
    .sheet textarea {
      width: 100%;
      min-height: 140px;
      resize: vertical;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: var(--key);
      color: var(--ink);
      font: inherit;
      font-size: 15px;
      line-height: 1.45;
      padding: 12px;
    }
    .sheet textarea:focus {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .sheet-profile {
      display: none;
      flex-direction: column;
      gap: 10px;
      flex: 1 1 0;
      min-height: 0;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      touch-action: pan-y;
      /* 컴퓨터: 고전 스크롤바 궤도가 「박스 안 박스」처럼 보임 → 폰처럼 숨김(스크롤은 유지) */
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .sheet-profile::-webkit-scrollbar { width: 0; height: 0; }
    .sheet-backdrop.mode-profile .sheet-profile { display: flex; }
    .sheet-backdrop.mode-profile .sheet-single { display: none; }
    .sheet-profile-row {
      display: grid;
      grid-template-columns: 72px 1fr;
      gap: 8px;
      align-items: center;
    }
    .sheet-profile-row-bp {
      grid-template-columns: 1fr;
      gap: 6px;
      align-items: stretch;
    }
    .sheet-profile-row label,
    .sheet-profile-row .sheet-profile-label {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      font-weight: 600;
    }
    .sex-toggle {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .sex-opt {
      appearance: none;
      border-radius: 10px;
      border: 2px solid rgba(232,242,236,0.28);
      background: #142820;
      color: var(--muted);
      font: inherit;
      font-size: 15px;
      font-weight: 600;
      line-height: 1.35;
      padding: 10px 12px;
      cursor: pointer;
      min-height: 44px;
      box-shadow: none;
      transform: scale(1);
      transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease,
        box-shadow 0.12s ease, transform 0.12s ease;
    }
    .sex-opt[aria-pressed="true"] {
      border: 3px solid #ffffff;
      background: #0b7a4a;
      color: #ffffff;
      font-weight: 800;
      box-shadow: 0 3px 0 #064028, 0 8px 16px rgba(0, 0, 0, 0.4);
      transform: scale(1.03);
    }
    .sex-opt[aria-pressed="true"]::before {
      content: "✓ ";
      font-weight: 900;
    }
    .sex-opt:focus-visible,
    .step-btn:focus-visible,
    .bp-chip:focus-visible,
    .q-mode-btn:focus-visible {
      outline: 3px solid #f2fff8;
      outline-offset: 2px;
    }
    .stepper {
      display: grid;
      grid-template-columns: 44px 1fr 44px;
      gap: 6px;
      align-items: center;
      min-height: 44px;
    }
    .step-btn {
      appearance: none;
      width: 44px;
      height: 44px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: var(--key);
      color: var(--ink);
      font: inherit;
      font-size: 22px;
      font-weight: 600;
      line-height: 1;
      cursor: pointer;
      padding: 0;
    }
    .step-btn:active {
      background: #1c4338;
    }
    .step-val {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 44px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: rgba(26,58,48,0.55);
      color: var(--ink);
      font-size: 16px;
      font-weight: 700;
      letter-spacing: -0.01em;
      text-align: center;
      padding: 0 8px;
    }
    .step-val.is-empty {
      color: var(--muted);
      font-weight: 600;
      font-size: 14px;
    }
    .bp-pick {
      display: flex;
      flex-direction: column;
      gap: 8px;
      min-width: 0;
      width: 100%;
    }
    .bp-pair {
      display: flex;
      flex-direction: column;
      gap: 8px;
      min-width: 0;
    }
    .bp-leg {
      display: grid;
      grid-template-columns: 40px minmax(0, 1fr);
      gap: 8px;
      align-items: center;
      min-width: 0;
    }
    .bp-leg-label {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
      text-align: center;
    }
    .bp-mini {
      grid-template-columns: 44px minmax(0, 1fr) 44px;
      min-width: 0;
    }
    .bp-mini .step-val {
      font-size: 16px;
      min-width: 0;
    }
    .bp-mini .step-btn {
      width: 44px;
      height: 44px;
      font-size: 22px;
    }
    .bp-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .bp-chip {
      appearance: none;
      border-radius: 999px;
      border: 2px solid rgba(232,242,236,0.28);
      background: #142820;
      color: var(--muted);
      font: inherit;
      font-size: 13px;
      font-weight: 600;
      padding: 8px 12px;
      cursor: pointer;
      min-height: 40px;
      box-shadow: none;
      transform: scale(1);
      transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease,
        box-shadow 0.12s ease, transform 0.12s ease;
    }
    .bp-chip[aria-pressed="true"] {
      border: 3px solid #ffffff;
      background: #0b7a4a;
      color: #ffffff;
      font-weight: 800;
      box-shadow: 0 3px 0 #064028, 0 8px 16px rgba(0, 0, 0, 0.4);
      transform: scale(1.06);
      z-index: 1;
    }
    .bp-chip[aria-pressed="true"]::before {
      content: "✓ ";
      font-weight: 900;
    }
    .bp-hint {
      margin: 0;
      color: rgba(155,181,168,0.75);
      font-size: 11px;
      line-height: 1.3;
    }
    .q-section {
      margin-top: 2px;
      padding-top: 12px;
      border-top: 1px solid var(--line);
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .q-section-title {
      margin: 0;
      font-size: 15px;
      font-weight: 700;
      color: #dff5e8;
      letter-spacing: -0.01em;
    }
    .q-block {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .q-block-label {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
      line-height: 1.35;
    }
    .q-block-hint {
      margin: 0;
      color: rgba(155,181,168,0.75);
      font-size: 11px;
      line-height: 1.35;
    }
    .q-leg-vessel-alert {
      color: #f0e6b8;
      font-weight: 650;
    }
    .q-mode-toggle {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .q-mode-btn {
      appearance: none;
      border-radius: 10px;
      border: 2px solid rgba(232,242,236,0.28);
      background: #142820;
      color: var(--muted);
      font: inherit;
      font-size: 14px;
      font-weight: 600;
      line-height: 1.35;
      padding: 9px 10px;
      cursor: pointer;
      min-height: 44px;
      box-shadow: none;
      transform: scale(1);
      transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease,
        box-shadow 0.12s ease, transform 0.12s ease;
    }
    .q-mode-btn[aria-pressed="true"] {
      border: 3px solid #ffffff;
      background: #0b7a4a;
      color: #ffffff;
      font-weight: 800;
      box-shadow: 0 3px 0 #064028, 0 8px 16px rgba(0, 0, 0, 0.4);
      transform: scale(1.03);
    }
    .q-mode-btn[aria-pressed="true"]::before {
      content: "✓ ";
      font-weight: 900;
    }
    .q-detail-input {
      width: 100%;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: var(--key);
      color: var(--ink);
      font: inherit;
      font-size: 14px;
      line-height: 1.4;
      padding: 9px 10px;
    }
    .q-detail-input:focus {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .q-detail-wrap[hidden] { display: none !important; }
    .q-chips .act-chip { font-size: 13px; padding: 8px 10px; }
    .key[data-field="profile"],
    .key[data-field="meds"] {
      min-height: 88px;
    }
    .key[data-field="profile"] .preview,
    .key[data-field="meds"] .preview {
      max-height: 4.8em;
    }
    .sheet-meds {
      display: none;
      flex-direction: column;
      gap: 10px;
      flex: 1 1 0;
      min-height: 0;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      touch-action: pan-y;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .sheet-meds::-webkit-scrollbar { width: 0; height: 0; }
    .sheet-backdrop.mode-meds .sheet-meds { display: flex; }
    .sheet-backdrop.mode-meds .sheet-single,
    .sheet-backdrop.mode-meds .sheet-profile { display: none; }
    .sheet-backdrop.mode-profile .sheet-meds { display: none; }
    .meds-field {
      display: flex;
      flex-direction: column;
      gap: 5px;
    }
    .meds-field label {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      font-weight: 600;
    }
    .meds-field textarea {
      width: 100%;
      min-height: 52px;
      resize: vertical;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: var(--key);
      color: var(--ink);
      font: inherit;
      font-size: 14px;
      line-height: 1.4;
      padding: 10px 12px;
    }
    .meds-field textarea:focus {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .labs-block {
      gap: 8px;
    }
    .labs-block-title {
      margin: 0;
      color: var(--ink);
      font-size: 15px;
      font-weight: 700;
    }
    .labs-hint {
      margin: 0;
      color: #d5e6dc;
      font-size: 14px;
      font-weight: 600;
      line-height: 1.5;
    }
    .lab-date-row {
      display: flex;
      align-items: center;
      flex-wrap: nowrap;
      gap: 4px;
      width: 100%;
    }
    .lab-date-row input {
      width: 100%;
      min-width: 0;
      text-align: center;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: var(--key);
      color: var(--ink);
      font: inherit;
      font-size: 15px;
      font-weight: 600;
      letter-spacing: 0.04em;
      line-height: 1.4;
      padding: 10px 6px;
    }
    .lab-date-row input#lab-date-y { flex: 1.35 1 0; max-width: 5.2em; }
    .lab-date-row input#lab-date-m,
    .lab-date-row input#lab-date-d { flex: 0.85 1 0; max-width: 3.2em; }
    .lab-date-row input:focus {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .lab-date-unit {
      flex: 0 0 auto;
      color: var(--ink);
      font-size: 14px;
      font-weight: 700;
      white-space: nowrap;
    }
    .birth-date-row {
      display: flex;
      align-items: center;
      flex-wrap: nowrap;
      gap: 4px;
      width: 100%;
    }
    .birth-date-row input {
      width: 100%;
      min-width: 0;
      text-align: center;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: var(--key);
      color: var(--ink);
      font: inherit;
      font-size: 15px;
      font-weight: 600;
      letter-spacing: 0.04em;
      line-height: 1.4;
      padding: 10px 6px;
    }
    .birth-date-row input#birth-date-y { flex: 1.35 1 0; max-width: 5.2em; }
    .birth-date-row input#birth-date-m,
    .birth-date-row input#birth-date-d { flex: 0.85 1 0; max-width: 3.2em; }
    .birth-date-row input:focus {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .birth-date-unit {
      flex: 0 0 auto;
      color: var(--ink);
      font-size: 14px;
      font-weight: 700;
      white-space: nowrap;
    }
    .profile-age-auto {
      min-height: 44px;
      display: flex;
      align-items: center;
      padding: 8px 12px;
      border-radius: 10px;
      border: 1px solid rgba(232,242,236,0.18);
      background: rgba(20, 40, 32, 0.65);
      color: var(--ink);
      font-size: 15px;
      font-weight: 700;
    }
    .profile-age-auto.is-empty {
      color: var(--muted);
      font-weight: 600;
    }
    .profile-age-hint {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
      font-weight: 500;
    }
    .labs-group {
      margin: 8px 0 0;
      color: var(--ink);
      font-size: 13px;
      font-weight: 700;
    }
    .lab-fields {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .lab-row {
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .lab-row-label {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
      line-height: 1.35;
    }
    .lab-row-alias {
      color: rgba(155, 181, 168, 0.85);
      font-weight: 500;
    }
    .lab-input,
    .lab-row input {
      width: 100%;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: var(--key);
      color: var(--ink);
      font: inherit;
      font-size: 14px;
      line-height: 1.4;
      padding: 10px 12px;
    }
    .lab-input:focus,
    .lab-row input:focus,
    #labs-memo:focus {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }
    .lab-history {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .lab-history-empty {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
    }
    .lab-history-item {
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 10px 12px;
      background: rgba(26, 58, 48, 0.55);
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .lab-history-meta {
      margin: 0;
      font-size: 13px;
      font-weight: 600;
      color: var(--ink);
    }
    .lab-history-sum {
      margin: 0;
      font-size: 12px;
      color: var(--muted);
      line-height: 1.4;
    }
    .lab-history-load {
      appearance: none;
      align-self: flex-start;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: rgba(26, 58, 48, 0.85);
      color: var(--ink);
      font: inherit;
      font-size: 12px;
      font-weight: 700;
      padding: 8px 10px;
      cursor: pointer;
    }
    .lab-history-docs {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
    }
    .lab-history-doc {
      position: relative;
      aspect-ratio: 1;
      border-radius: 10px;
      overflow: hidden;
      border: 1px solid var(--line);
      background: #0f1f18;
      padding: 0;
    }
    .lab-history-doc .lab-photo-open {
      appearance: none;
      display: block;
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
      border: 0;
      background: transparent;
      cursor: pointer;
    }
    .lab-history-doc img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .lab-history-hint {
      margin: 0 0 4px;
      font-size: 12px;
      color: var(--muted);
      line-height: 1.4;
    }
    .lab-photos-block {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin: 4px 0 2px;
    }
    .lab-photos-hint {
      font-size: 12px;
      font-weight: 500;
      color: var(--muted);
      line-height: 1.45;
    }
    .lab-photos-howto {
      margin: 0;
      padding: 8px 10px;
      border-radius: 10px;
      border: 1px solid rgba(232, 242, 236, 0.16);
      background: rgba(26, 58, 48, 0.55);
      font-size: 12px;
      font-weight: 600;
      color: var(--ink);
      line-height: 1.45;
    }
    .lab-photos-howto[hidden] { display: none; }
    .lab-photos-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .lab-photos-actions button {
      appearance: none;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: rgba(26, 58, 48, 0.7);
      color: var(--ink);
      font: inherit;
      font-size: 13px;
      font-weight: 700;
      padding: 11px 8px;
      cursor: pointer;
    }
    .lab-photos-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
    }
    .lab-photo-card {
      position: relative;
      aspect-ratio: 1;
      border-radius: 10px;
      overflow: hidden;
      border: 1px solid var(--line);
      background: #0f1f18;
      padding: 0;
    }
    .lab-photo-open {
      appearance: none;
      display: block;
      width: 100%;
      height: 100%;
      margin: 0;
      padding: 0;
      border: 0;
      background: transparent;
      cursor: pointer;
    }
    .lab-photo-card img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .lab-photo-del {
      position: absolute;
      top: 4px;
      right: 4px;
      z-index: 2;
      min-width: 34px;
      height: 22px;
      padding: 0 6px;
      border-radius: 8px;
      border: 0;
      background: rgba(0, 0, 0, 0.72);
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      line-height: 1;
      cursor: pointer;
    }
    .lab-photo-tap-badge {
      position: absolute;
      left: 4px;
      bottom: 4px;
      z-index: 1;
      padding: 3px 6px;
      border-radius: 6px;
      background: rgba(11, 26, 20, 0.78);
      color: #e8f2ec;
      font-size: 10px;
      font-weight: 700;
      line-height: 1.2;
      pointer-events: none;
    }
    .lab-photo-tap-badge.is-read {
      background: rgba(46, 92, 72, 0.9);
      color: #cfe6d9;
    }
    .lab-photos-empty {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }
    .lab-photo-modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 90;
      display: none;
      align-items: flex-end;
      justify-content: center;
      background: rgba(0, 0, 0, 0.55);
      padding: 12px;
    }
    .lab-photo-modal-backdrop.open { display: flex; }
    .lab-photo-modal {
      width: min(390px, 100%);
      max-height: min(88vh, 760px);
      overflow: auto;
      border-radius: 16px 16px 12px 12px;
      background: #142820;
      border: 1px solid rgba(232, 242, 236, 0.16);
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .lab-photo-modal-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .lab-photo-modal-head h3 {
      margin: 0;
      font-size: 16px;
      color: var(--ink);
    }
    .lab-photo-modal-close {
      appearance: none;
      border: 0;
      background: transparent;
      color: var(--ink);
      font-size: 24px;
      line-height: 1;
      cursor: pointer;
    }
    .lab-photo-modal-preview {
      width: 100%;
      max-height: 220px;
      object-fit: contain;
      border-radius: 10px;
      background: #0f1f18;
      border: 1px solid var(--line);
    }
    .lab-photo-modal-status {
      margin: 0;
      font-size: 13px;
      color: var(--muted);
      line-height: 1.45;
      white-space: pre-wrap;
    }
    .lab-photo-modal-actions {
      display: grid;
      grid-template-columns: 1fr 1.2fr;
      gap: 8px;
    }
    .lab-photo-modal-actions button {
      appearance: none;
      border-radius: 10px;
      border: 1px solid var(--line);
      font: inherit;
      font-size: 14px;
      font-weight: 700;
      padding: 12px 8px;
      cursor: pointer;
    }
    .lab-photo-btn-secondary {
      background: rgba(26, 58, 48, 0.7);
      color: var(--ink);
    }
    .lab-photo-btn-primary {
      background: var(--accent);
      color: #0b1a14;
      border-color: transparent;
    }
    .lab-photo-btn-primary:disabled,
    .lab-photo-btn-secondary:disabled {
      opacity: 0.55;
      cursor: default;
    }
    .sheet-actions {
      display: grid;
      grid-template-columns: 1fr 1.4fr;
      gap: 8px;
      flex-shrink: 0;
      margin-top: auto;
      padding-top: 8px;
      padding-bottom: 4px;
      border-top: 1px solid rgba(232,242,236,0.12);
      background: #142820;
    }
    .sheet-actions button {
      appearance: none;
      border-radius: 12px;
      border: 1px solid var(--line);
      padding: 12px 10px;
      font: inherit;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
    }
    .btn-clear {
      background: transparent;
      color: var(--muted);
    }
    .btn-save {
      background: var(--accent);
      border-color: transparent;
      color: #062016;
    }
    /* 사전 동의 게이트 — 서비스용 템플릿(법무 확정본 아님) */
    body.consent-pending > *:not(#consent-gate) {
      visibility: hidden;
      pointer-events: none;
    }
    #consent-gate {
      position: fixed;
      inset: 0;
      z-index: 10000;
      display: none;
      flex-direction: column;
      background:
        radial-gradient(120% 80% at 10% -10%, #245844 0%, transparent 55%),
        radial-gradient(90% 60% at 100% 0%, #1a3a2e 0%, transparent 50%),
        var(--bg);
      color: var(--ink);
      padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    }
    body.consent-pending #consent-gate {
      display: flex;
    }
    .consent-card {
      flex: 1 1 auto;
      min-height: 0;
      display: flex;
      flex-direction: column;
      max-width: 480px;
      width: 100%;
      margin: 0 auto;
    }
    .consent-brand {
      margin: 0 0 12px;
    }
    .consent-brand-ko {
      margin: 0;
      font-size: 18px;
      font-weight: 700;
      line-height: 1.3;
      letter-spacing: -0.02em;
      color: #dff5e8;
    }
    .consent-brand-en {
      margin: 4px 0 0;
      font-size: 13px;
      font-weight: 500;
      line-height: 1.35;
      letter-spacing: 0.01em;
      color: var(--muted);
    }
    .consent-eyebrow {
      margin: 0 0 8px;
      font-size: 13px;
      letter-spacing: 0.04em;
      color: var(--muted);
    }
    .consent-title {
      margin: 0 0 14px;
      font-size: 26px;
      line-height: 1.3;
      font-weight: 700;
    }
    .consent-scroll {
      flex: 1 1 auto;
      min-height: 0;
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 16px 14px;
      margin-bottom: 14px;
    }
    .consent-scroll h2 {
      margin: 0 0 10px;
      font-size: 17px;
      font-weight: 700;
      color: #dff5e8;
    }
    .consent-scroll ul {
      margin: 0;
      padding: 0 0 0 1.15em;
    }
    .consent-scroll li {
      margin: 0 0 12px;
      font-size: 16px;
      line-height: 1.55;
      color: #e8f2ec;
    }
    .consent-scroll li:last-child { margin-bottom: 0; }
    .consent-scroll strong {
      color: #9fe3bf;
      font-weight: 700;
    }
    .consent-footer {
      flex: 0 0 auto;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .consent-privacy {
      margin: 0;
      font-size: 14px;
      line-height: 1.4;
    }
    .consent-privacy a {
      color: #9fe3bf;
      font-weight: 700;
      text-underline-offset: 2px;
    }
    .consent-check {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 12px 10px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: rgba(26, 58, 48, 0.55);
      cursor: pointer;
      user-select: none;
    }
    .consent-check input {
      width: 22px;
      height: 22px;
      margin: 2px 0 0;
      flex: 0 0 auto;
      accent-color: var(--accent);
    }
    .consent-check span {
      font-size: 16px;
      line-height: 1.45;
      font-weight: 650;
      color: #e8f2ec;
    }
    .consent-enter {
      appearance: none;
      width: 100%;
      min-height: 52px;
      border-radius: 14px;
      border: 2px solid #062016;
      background: #b8f0d0;
      color: #062016;
      font: inherit;
      font-size: 18px;
      font-weight: 800;
      letter-spacing: -0.01em;
      cursor: pointer;
    }
    .consent-enter:disabled {
      background: #3a5248;
      color: #8aa398;
      border-color: #2a3f37;
      cursor: not-allowed;
    }
    .consent-enter:focus-visible {
      outline: 3px solid #dff5e8;
      outline-offset: 2px;
    }
    .records-panel {
      margin: 0 0 14px;
    }
    .app-shell-version {
      margin: 6px 2px 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }
    .app-shell-actions {
      margin-top: 12px;
    }
    .app-shell-actions .records-transfer-lead {
      margin-top: 8px;
    }
    body:has(#app-update-banner:not([hidden])) #storage-save-banner {
      top: calc(78px + env(safe-area-inset-top));
    }
    .records-transfer .ops-section-title {
      margin-bottom: 4px;
    }
    .records-transfer-lead {
      margin: 0 0 10px;
      color: rgba(155, 181, 168, 0.9);
      font-size: 11px;
      line-height: 1.45;
    }
    .records-transfer-warn {
      margin: 0 0 10px;
      color: #e8c98a;
      font-size: 11px;
      line-height: 1.45;
    }
    .records-transfer-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .records-transfer-btn {
      appearance: none;
      flex: 1 1 100%;
      margin: 0;
      padding: 10px 12px;
      border-radius: 10px;
      border: 1px solid rgba(61, 155, 110, 0.45);
      background: rgba(61, 155, 110, 0.16);
      color: #dff5e8;
      font: inherit;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      min-height: 44px;
      text-align: center;
      white-space: normal;
      line-height: 1.3;
    }
    .records-transfer-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .records-transfer-btn.is-secondary {
      border-color: var(--line);
      background: rgba(26, 58, 48, 0.55);
      color: #c5d9cd;
    }
    .records-transfer-status {
      margin: 8px 0 0;
      min-height: 1.2em;
      color: #9fe3bf;
      font-size: 11px;
      line-height: 1.35;
    }
    .records-transfer-status.is-error {
      color: #f0b4b4;
    }
    .storage-save-banner {
      position: fixed;
      left: 12px;
      right: 12px;
      top: calc(10px + env(safe-area-inset-top));
      z-index: 80;
      margin: 0;
      padding: 12px 14px;
      border-radius: 12px;
      border: 1px solid rgba(240, 180, 180, 0.5);
      background: #3a1e1e;
      color: #f6d6d6;
      font-size: 14px;
      font-weight: 650;
      line-height: 1.45;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
      cursor: pointer;
    }
    .q-weekly-remind {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin: 0 0 14px;
      padding: 12px 12px 12px 14px;
      border-radius: 12px;
      border: 1px solid rgba(125, 206, 160, 0.4);
      background: rgba(61, 155, 110, 0.14);
      color: #dff5e8;
    }
    .q-weekly-remind[hidden] { display: none; }
    .q-weekly-remind-body {
      flex: 1;
      min-width: 0;
    }
    .q-weekly-remind-title {
      margin: 0 0 4px;
      font-size: 12px;
      font-weight: 800;
      color: #9fe3bf;
    }
    .q-weekly-remind-msg {
      margin: 0;
      font-size: 14px;
      font-weight: 650;
      line-height: 1.45;
    }
    .q-weekly-remind-actions {
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex: 0 0 auto;
    }
    .q-weekly-remind-edit,
    .q-weekly-remind-dismiss {
      appearance: none;
      border: 0;
      border-radius: 999px;
      padding: 8px 12px;
      font: inherit;
      font-size: 12px;
      font-weight: 800;
      cursor: pointer;
    }
    .q-weekly-remind-edit {
      background: #3d9b6e;
      color: #fff;
    }
    .q-weekly-remind-dismiss {
      background: transparent;
      color: #9fb9ac;
      border: 1px solid rgba(232, 242, 236, 0.18);
    }
    .data-protect-undo {
      position: fixed;
      left: 12px;
      right: 12px;
      bottom: calc(72px + env(safe-area-inset-bottom));
      z-index: 85;
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 0;
      padding: 12px 14px;
      border-radius: 12px;
      border: 1px solid rgba(125, 206, 160, 0.45);
      background: #163028;
      color: #d8f0e2;
      font-size: 13px;
      font-weight: 650;
      line-height: 1.4;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    }
    .data-protect-undo[hidden] { display: none; }
    .data-protect-undo-msg {
      flex: 1;
      min-width: 0;
    }
    .data-protect-undo-btn {
      flex: 0 0 auto;
      border: 0;
      border-radius: 999px;
      padding: 8px 12px;
      background: #3d9b6e;
      color: #fff;
      font-size: 13px;
      font-weight: 800;
      cursor: pointer;
    }
    .ops-consent-row,
    .records-consent-row {
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid rgba(232, 242, 236, 0.08);
    }
    .ops-consent-link,
    .records-consent-link {
      appearance: none;
      display: inline;
      margin: 0;
      padding: 0;
      border: 0;
      background: none;
      color: #9fe3bf;
      font: inherit;
      font-size: 12px;
      font-weight: 650;
      text-decoration: underline;
      text-underline-offset: 2px;
      cursor: pointer;
      min-height: 28px;
    }
    .ops-consent-link:focus-visible,
    .records-consent-link:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    .consent-withdraw {
      position: fixed;
      inset: 0;
      z-index: 13000;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      padding: 16px;
      background: rgba(8, 16, 13, 0.72);
    }
    .consent-withdraw[hidden] {
      display: none !important;
    }
    .consent-withdraw-card {
      width: min(100%, 420px);
      margin-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
      border-radius: 16px;
      border: 1px solid var(--line);
      background: #163028;
      padding: 16px;
    }
    .consent-withdraw-text {
      margin: 0 0 14px;
      font-size: 15px;
      line-height: 1.5;
      color: var(--ink);
    }
    .consent-withdraw-actions {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .consent-withdraw-actions button {
      appearance: none;
      border-radius: 12px;
      padding: 12px 10px;
      font: inherit;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
    }
    .consent-withdraw-backup,
    .consent-withdraw-cancel {
      background: transparent;
      color: var(--ink);
      border: 1px solid var(--line);
    }
    .consent-withdraw-backup {
      color: #9fe3bf;
      border-color: rgba(159, 227, 191, 0.45);
    }
    .consent-withdraw-confirm {
      background: #8d3b34;
      color: #fff4f2;
      border: 0;
    }
    .records-contact {
      margin-top: 14px;
      padding-top: 12px;
      border-top: 1px solid rgba(232, 242, 236, 0.08);
    }
    .records-contact .ops-section-title {
      margin-bottom: 6px;
    }
    .records-contact-mail {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      margin-top: 8px;
      text-decoration: none;
      box-sizing: border-box;
    }
  