:root {
  color-scheme: dark;
  font-family: Inter, "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f4f7fb;
  background: #07090d;
  font-synthesis: none;
  --bg: #07090d;
  --panel: #0c1017;
  --panel-strong: #101620;
  --line: #202936;
  --line-soft: #171e29;
  --muted: #8290a3;
  --muted-strong: #a9b5c5;
  --blue: #3182ff;
  --blue-light: #6ca7ff;
  --cyan: #55d8ff;
  --danger: #ff6d7d;
  --success: #43d9a3;
  --sidebar: 252px;
  --text-meta: 12px;
  --text-control: 13px;
  --text-body: 14px;
}

* { box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
[hidden] { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: var(--bg); font-size: 14px; letter-spacing: 0; }
body.has-modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { color: inherit; }
button, [role="button"], select, input[type="range"] { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--blue-light);
  outline-offset: 3px;
}

#cursorTrail { position: fixed; inset: 0; z-index: 20; pointer-events: none; }

.app-shell { min-height: 100vh; background: linear-gradient(145deg, rgba(30, 104, 255, 0.07) 0, transparent 24%), var(--bg); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; width: var(--sidebar); flex-direction: column;
  border-right: 1px solid var(--line-soft); background: rgba(7, 9, 13, 0.94); padding: 26px 18px 22px;
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: #fff; text-decoration: none; }
.brand-mark { position: relative; display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; gap: 3px; border: 1px solid #2d7cff; border-radius: 7px; background: #0a1a35; box-shadow: inset 0 0 18px rgba(49, 130, 255, 0.16); }
.brand-mark span { display: block; width: 3px; border-radius: 1px; background: #68a7ff; }
.brand-mark span:nth-child(1) { height: 9px; }
.brand-mark span:nth-child(2) { height: 16px; background: #d4e6ff; }
.brand-mark span:nth-child(3) { height: 12px; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 16px; line-height: 1.2; }
.brand-copy small { color: #71839b; font-size: 10px; font-weight: 800; line-height: 1.2; }
.tool-nav { display: grid; min-height: 0; gap: 22px; margin-top: 42px; overflow-x: hidden; overflow-y: auto; padding-right: 2px; }
.nav-group { display: grid; gap: 6px; }
.nav-group-home { padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.nav-item-static { grid-template-columns: minmax(0, 1fr); }
.nav-item-static .nav-item-action { padding-right: 9px; }
.nav-group-lab { padding-top: 18px; border-top: 1px solid var(--line-soft); }
.nav-label { margin: 0 12px 10px; color: #718096; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.nav-group-toggle { display: flex; width: 100%; min-height: 30px; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-radius: 5px; background: transparent; padding: 0 10px; color: #718096; font-size: 11px; font-weight: 800; text-align: left; }
.nav-group-toggle:hover { background: #0c121b; color: #aab9ca; }
.nav-group-toggle svg { width: 14px; height: 14px; transition: transform 180ms ease; }
.nav-group.is-collapsed .nav-group-toggle svg { transform: rotate(-90deg); }
.nav-group.is-collapsed > .nav-item { display: none; }
.nav-item { display: grid; width: 100%; min-height: 62px; grid-template-columns: minmax(0, 1fr) 30px; align-items: center; border: 1px solid transparent; border-radius: 7px; background: transparent; overflow: hidden; transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, opacity 120ms ease, transform 120ms ease; }
.nav-item-action { display: grid; min-width: 0; min-height: 60px; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 8px; border: 0; background: transparent; padding: 9px 0 9px 9px; color: inherit; text-align: left; }
.nav-item-action > svg { width: 18px; color: #68768b; justify-self: center; }
.nav-item-action span { display: grid; gap: 4px; min-width: 0; }
.nav-item-action strong { font-size: 14px; font-weight: 650; }
.nav-item-action small { overflow: hidden; color: #7c8ba0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.nav-item[data-protected] .nav-item-action { grid-template-columns: 34px minmax(0, 1fr) 20px; }
.nav-item-action > .nav-access-icon { width: 14px; color: #8290a3; }
.nav-item.is-authorized .nav-access-icon { color: #4ccf9c; }
.nav-item:hover { border-color: #1d2c40; background: #0c121b; }
.nav-item.is-active { border-color: #243754; background: #101927; box-shadow: inset 3px 0 #3a88ff; }
.nav-item.is-active .nav-item-action > svg { color: #68a7ff; }
.nav-item.is-active .nav-item-action small { color: #8094af; }
.nav-drag-handle { display: grid; width: 24px; height: 34px; min-width: 24px; place-items: center; border: 0; border-radius: 4px; background: transparent; padding: 0; color: #4f5f74; cursor: grab; opacity: 0.58; touch-action: none; transition: 150ms ease; }
.nav-drag-handle:hover { background: rgba(80, 126, 190, 0.12); color: #87a4c9; opacity: 1; }
.nav-drag-handle svg { width: 15px; height: 15px; pointer-events: none; }
.nav-item.is-reordering { border: 1px dashed #3c78c9; background: rgba(35, 91, 168, 0.08); box-shadow: none; transform: none; }
.nav-item.is-reordering > * { visibility: hidden; }
.nav-item.is-reordering .nav-drag-handle,
.is-reordering-tools .nav-drag-handle { cursor: grabbing; }
.is-reordering-tools, .is-reordering-tools * { cursor: grabbing !important; user-select: none !important; }
.nav-drag-preview { position: fixed; z-index: 80; margin: 0; border-color: #4f8fe8; background: #111a27; opacity: 1; pointer-events: none; transform: scale(1.035) rotate(0.6deg); transform-origin: center; box-shadow: 0 18px 38px rgba(0, 0, 0, 0.38), 0 7px 14px rgba(23, 92, 192, 0.24), 0 0 0 1px rgba(100, 164, 255, 0.2); animation: nav-card-lift 130ms cubic-bezier(0.2, 0.8, 0.2, 1) both; will-change: left, top, transform; }
.nav-drag-preview .nav-drag-handle { color: #8fb9f2; opacity: 1; }
@keyframes nav-card-lift {
  from { opacity: 0.72; transform: scale(0.98) rotate(0deg); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18); }
  to { opacity: 1; transform: scale(1.035) rotate(0.6deg); }
}
.sidebar-foot { display: grid; gap: 13px; margin-top: auto; padding: 12px 6px 0; color: #79899f; font-size: 11px; }
.local-status { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px rgba(67, 217, 163, 0.8); }
.theme-toggle { display: flex; min-height: 38px; align-items: center; justify-content: center; gap: 8px; border: 1px solid #263448; border-radius: 5px; background: #0d141e; color: #aab8ca; font-size: 12px; font-weight: 650; transition: 160ms ease; }
.theme-toggle:hover { border-color: #3d587d; background: #131e2d; color: #e8eef6; }
.theme-toggle svg { width: 15px; height: 15px; color: #75adff; }
[data-theme="dark"] .theme-icon-moon, [data-theme="dark"] .theme-label-dark,
[data-theme="light"] .theme-icon-sun, [data-theme="light"] .theme-label-light { display: none; }
.mobile-bar { display: none; }
.mobile-actions { display: flex; align-items: center; gap: 7px; }
.mobile-actions .theme-toggle { width: 44px; min-height: 44px; padding: 0; }

.main-content { min-height: 100vh; margin-left: var(--sidebar); }
.tool-view { width: min(1180px, calc(100% - 72px)); margin: 0 auto; padding: 62px 0 90px; }
.tool-view[hidden] { display: none; }
.site-footer { display: flex; width: min(1180px, calc(100% - 72px)); align-items: center; justify-content: center; gap: 8px; margin: -48px auto 0; padding: 0 0 28px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.site-footer a { color: var(--muted-strong); text-decoration: none; }
.site-footer a:hover { color: var(--blue-light); text-decoration: underline; text-underline-offset: 3px; }
.view-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: #75869d; font-size: 11px; font-weight: 800; }
.eyebrow span { color: var(--blue-light); }
.view-header h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); font-weight: 650; line-height: 1.12; }
.view-header > div > p:last-child { max-width: 620px; margin: 11px 0 0; color: var(--muted-strong); font-size: 15px; line-height: 1.7; }

.home-view { max-width: 1240px; }
.home-header { margin-bottom: 28px; }
.home-today { display: grid; grid-template-columns: 1.08fr 0.82fr 1fr; border: 1px solid var(--line); border-radius: 8px; background: #0c1119; box-shadow: 0 22px 60px rgba(0, 0, 0, 0.2); overflow: hidden; }
.home-date-primary { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 8px; padding: 25px 28px; }
.home-date-label { margin: 0; color: #7395c2; font-size: var(--text-meta); font-weight: 750; }
.home-date-primary > strong { color: #edf5ff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 38px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: 0; }
.home-date-primary h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; margin: 1px 0 0; color: #d9e4f1; font-size: 15px; font-weight: 650; line-height: 1.35; }
.home-date-primary h2 span:first-child { white-space: nowrap; }
.home-date-primary h2 span:last-child { color: #70bfe1; font-size: var(--text-control); }
.home-date-primary > div > p { margin: 6px 0 0; color: #7f8fa4; font-size: var(--text-control); line-height: 1.5; }
.home-almanac { display: grid; margin: 0; border-right: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
.home-almanac > div { display: grid; grid-template-columns: minmax(72px, auto) minmax(0, 1fr); align-items: center; gap: 14px; padding: 15px 22px; }
.home-almanac > div + div { border-top: 1px solid var(--line-soft); }
.home-almanac dt { display: flex; align-items: center; gap: 8px; color: #73849a; font-size: var(--text-control); }
.home-almanac dt svg { width: 15px; height: 15px; color: #5bbad9; }
.home-almanac dd { margin: 0; overflow-wrap: anywhere; color: #cbd7e5; font-size: var(--text-body); font-weight: 650; text-align: right; }
.home-progress-list { display: grid; align-content: center; gap: 15px; padding: 24px 26px; }
.home-progress-row { display: grid; gap: 7px; }
.home-progress-row > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #7d8da2; font-size: var(--text-meta); }
.home-progress-row strong { color: #b9c9da; font-size: var(--text-meta); font-variant-numeric: tabular-nums; }
.home-progress-track { height: 5px; border-radius: 3px; background: #1a2431; overflow: hidden; }
.home-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #438cff, #55d8ff); transition: width 500ms ease; }
.home-progress-row:nth-child(2) .home-progress-track span { background: linear-gradient(90deg, #6e7ff2, #9c83ee); }
.home-progress-row:nth-child(3) .home-progress-track span { background: linear-gradient(90deg, #2caf86, #69d8a9); }
.home-progress-row:nth-child(4) .home-progress-track span { background: linear-gradient(90deg, #dc9d43, #eac86d); }
.home-tool-groups { display: grid; gap: 42px; margin-top: 44px; }
.home-tool-group { min-width: 0; }
.home-group-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.home-group-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 1px solid #234e79; border-radius: 7px; background: #10243a; color: #6ab7ff; }
.home-tool-group:nth-child(2) .home-group-icon { border-color: #444577; background: #1b1c36; color: #aaa1ff; }
.home-tool-group:nth-child(3) .home-group-icon { border-color: #275e52; background: #102b27; color: #6ed5b7; }
.home-tool-group:nth-child(4) .home-group-icon { border-color: #66502a; background: #2b2416; color: #e7c46e; }
.home-group-icon svg { width: 18px; height: 18px; }
.home-group-header h2 { margin: 0; color: #dce6f2; font-size: 18px; font-weight: 650; line-height: 1.35; }
.home-group-header p { margin: 3px 0 0; color: #74849a; font-size: var(--text-control); line-height: 1.45; }
.home-tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 10px; }
.home-tool-entry { display: grid; min-width: 0; min-height: 82px; grid-template-columns: 38px minmax(0, 1fr) 20px; align-items: center; gap: 12px; border: 1px solid var(--line-soft); border-radius: 7px; background: #0b0f16; padding: 14px 15px; color: inherit; text-align: left; transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.home-tool-entry:hover { border-color: #2d527f; background: #101824; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2); }
.home-tool-entry > svg:first-child { width: 19px; height: 19px; color: #6b9bd2; justify-self: center; }
.home-tool-entry > svg:last-child { width: 15px; height: 15px; color: #4c5d72; transition: color 160ms ease, transform 160ms ease; }
.home-tool-entry:hover > svg:last-child { color: #7fb8fa; transform: translate(2px, -2px); }
.home-tool-entry > span { display: grid; min-width: 0; gap: 5px; }
.home-tool-entry strong { color: #d8e2ed; font-size: var(--text-body); font-weight: 650; }
.home-tool-entry small { overflow: hidden; color: #728198; font-size: var(--text-meta); line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.privacy-badge { display: flex; min-height: 36px; align-items: center; gap: 7px; border: 1px solid #26354a; border-radius: 5px; background: #0b121d; padding: 0 12px; color: #9cacc1; font-size: 12px; white-space: nowrap; }
.privacy-badge svg { width: 14px; color: var(--blue-light); }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 328px; border: 1px solid var(--line); border-radius: 8px; background: rgba(12, 16, 23, 0.82); overflow: hidden; box-shadow: 0 28px 80px rgba(0, 0, 0, 0.25); }
.upload-panel { min-width: 0; min-height: 530px; padding: 24px; }
.file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.drop-zone { display: flex; min-height: 480px; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #2a3b52; border-radius: 6px; background: linear-gradient(180deg, rgba(22, 35, 55, 0.35), rgba(8, 11, 16, 0.25)); padding: 40px 24px; text-align: center; transition: 180ms ease; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: #4389ee; background: linear-gradient(180deg, rgba(35, 74, 130, 0.32), rgba(8, 13, 22, 0.4)); }
.upload-visual { position: relative; display: grid; width: 78px; height: 78px; place-items: center; margin-bottom: 25px; border: 1px solid #2a5da7; border-radius: 50%; background: #0b1b32; color: #70abff; }
.upload-visual svg { width: 28px; height: 28px; }
.pulse-ring { position: absolute; inset: -9px; border: 1px solid rgba(74, 143, 244, 0.16); border-radius: 50%; }
.drop-zone h2, .queue-head h2, .panel-title h2, .result-panel h2, .section-heading h2 { margin: 0; font-size: 16px; font-weight: 650; }
.drop-zone > p { margin: 9px 0 24px; color: var(--muted-strong); font-size: 13px; line-height: 1.6; }
.upload-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.secondary-button, .primary-button, .text-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 5px; transition: 160ms ease; }
.secondary-button { min-height: 40px; border: 1px solid #314057; background: #111925; padding: 0 15px; color: #d8e1ed; font-size: 13px; font-weight: 650; }
.secondary-button:hover { border-color: #4b6590; background: #162132; }
.secondary-button:disabled, .text-button:disabled { cursor: not-allowed; opacity: 0.38; }
.secondary-button svg, .primary-button svg, .text-button svg { width: 15px; height: 15px; }
.primary-button { min-height: 44px; border: 1px solid #347ff0; background: linear-gradient(135deg, #2367d4, #3c91ff); padding: 0 18px; color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 10px 24px rgba(29, 101, 216, 0.2); }
.primary-button:hover:not(:disabled) { border-color: #61a3ff; filter: brightness(1.08); transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: 0.38; }
.text-button { border: 0; background: transparent; padding: 6px; color: #8797ad; font-size: 12px; }
.text-button:hover { color: #d8e2ee; }
.icon-button { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid #29364a; background: #101722; }
.icon-button:hover { border-color: #3f5f8d; background: #152033; }
.icon-button svg { width: 16px; height: 16px; }

.settings-panel { border-left: 1px solid var(--line); background: #0a0e14; padding: 28px; }
.panel-title { display: flex; align-items: center; gap: 10px; margin-bottom: 31px; }
.panel-title svg { width: 17px; color: var(--blue-light); }
.setting-group { margin-bottom: 27px; }
.setting-group > label, .field-label { display: block; margin-bottom: 10px; color: #b9c4d3; font-size: 13px; font-weight: 650; }
.setting-hint { margin: 8px 0 0; color: #718198; font-size: 11px; line-height: 1.6; }
.setting-group.is-lossless { opacity: 0.42; }
.setting-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.setting-label-row label, .setting-label-row .field-label { margin: 0; color: #b9c4d3; font-size: 13px; font-style: normal; font-weight: 650; }
.setting-label-row output { min-width: 44px; border: 1px solid #274a78; border-radius: 4px; background: #0d1d32; padding: 4px 6px; color: #78afff; font-size: 12px; text-align: center; }
.range { width: 100%; height: 4px; margin: 8px 0; appearance: none; border-radius: 2px; outline: 0; background: linear-gradient(to right, #3a8cff 72%, #26303d 72%); }
.range::-webkit-slider-thumb { width: 15px; height: 15px; appearance: none; border: 3px solid #d9e9ff; border-radius: 50%; background: #397fdf; box-shadow: 0 0 0 3px rgba(54, 130, 240, 0.18); }
.range-labels { display: flex; justify-content: space-between; color: #718096; font-size: 11px; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding-right: 38px; }
.select-wrap > svg { position: absolute; top: 50%; right: 12px; width: 14px; pointer-events: none; transform: translateY(-50%); color: #718198; }
select, input, textarea { width: 100%; border: 1px solid #293545; border-radius: 5px; outline: 0; background: #0b1018; color: #e9eef6; font-size: 13px; transition: 150ms ease; }
select, input { height: 42px; padding: 0 12px; }
textarea { min-height: 108px; padding: 12px; line-height: 1.65; resize: vertical; }
select:hover, input:hover, textarea:hover { border-color: #3b4c64; }
select:focus, input:focus, textarea:focus { border-color: #458be9; box-shadow: 0 0 0 3px rgba(45, 126, 235, 0.1); }
input::placeholder, textarea::placeholder { color: #465368; }
input[readonly] { color: #8392a6; background: #090d13; }
.switch { display: inline-flex !important; align-items: center; gap: 7px; margin: 0 !important; cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch span { position: relative; width: 28px; height: 16px; border-radius: 10px; background: #26303e; transition: 160ms ease; }
.switch span::after { position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 50%; background: #7b8796; content: ""; transition: 160ms ease; }
.switch input:checked + span { background: #236acb; }
.switch input:checked + span::after { left: 15px; background: #fff; }
.switch em { color: #8796aa; font-size: 12px; font-style: normal; font-weight: 500; }
.dimension-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; transition: opacity 160ms ease; }
.dimension-grid.is-disabled { pointer-events: none; opacity: 0.35; }
.dimension-grid label { position: relative; color: #7b899c; font-size: 11px; }
.dimension-grid input { height: 39px; margin-top: 6px; padding-right: 27px; }
.dimension-grid label span { position: absolute; right: 9px; bottom: 11px; color: #526075; }
.settings-panel > .primary-button { width: 100%; margin-top: 4px; }
.panel-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; color: #718096; font-size: 11px; }
.panel-note svg { width: 11px; }
.format-upload-visual { border-color: #286a8d; background: #0a1d29; color: #68d1ff; }
.conversion-spec { margin: 0 0 26px; }
.conversion-spec > div { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: start; gap: 12px; border-bottom: 1px solid var(--line-soft); padding: 13px 0; }
.conversion-spec dt { color: #7d8da3; font-size: 11px; }
.conversion-spec dd { margin: 0; color: #c2cedd; font-size: 12px; line-height: 1.55; text-align: right; overflow-wrap: anywhere; }
.format-notice { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 23px; border-left: 2px solid #286b9a; background: #0b1620; padding: 11px 12px; }
.format-notice svg { width: 13px; height: 13px; flex: 0 0 13px; margin-top: 1px; color: #61bcec; }
.format-notice p { margin: 0; color: #8da0b6; font-size: 12px; line-height: 1.65; }
.format-settings > .primary-button { width: 100%; }

.format-workflow { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: rgba(12, 16, 23, 0.86); box-shadow: 0 28px 80px rgba(0, 0, 0, 0.25); }
.format-step { display: grid; grid-template-columns: 68px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.format-step:last-child { border-bottom: 0; }
.format-step-index { display: flex; justify-content: center; border-right: 1px solid var(--line); padding-top: 34px; color: #6897d6; font-size: 12px; font-weight: 800; white-space: nowrap; }
.format-step-body { min-width: 0; padding: 30px; }
.format-step-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.format-step-heading h2 { margin: 0; font-size: 18px; font-weight: 650; }
.format-step-heading > div:first-child > p:last-child { max-width: 680px; margin: 8px 0 0; color: var(--muted-strong); font-size: 13px; line-height: 1.65; }
.format-step-heading strong { color: #b9c9dc; font-weight: 650; }
.external-tool-button { flex: 0 0 auto; text-decoration: none; }
.format-maker-step { background: linear-gradient(110deg, rgba(31, 91, 178, 0.11), transparent 54%); }
.format-maker-note { display: flex; align-items: center; gap: 8px; margin-top: 20px; border-top: 1px solid var(--line-soft); padding-top: 16px; color: #8294ab; font-size: 12px; line-height: 1.55; }
.format-maker-note svg { width: 13px; flex: 0 0 13px; color: #65a4ff; }
.format-drop-zone { min-height: 92px; flex-direction: row; justify-content: space-between; gap: 20px; margin-top: 23px; padding: 18px 20px; text-align: left; }
.format-drop-copy { display: flex; min-width: 0; align-items: center; gap: 13px; }
.format-drop-copy > span:last-child { display: grid; gap: 5px; }
.format-drop-copy strong { color: #dbe5f1; font-size: 14px; }
.format-drop-copy small { color: #8191a7; font-size: 11px; }
.format-drop-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border: 1px solid #285481; border-radius: 6px; background: #0b1c2c; color: #6aaeff; }
.format-drop-icon svg { width: 19px; }
.file-queue.format-file-queue { min-height: 0; margin-top: 22px; }
.format-file-queue .queue-head { padding-bottom: 12px; }
.format-empty-state { display: flex; min-height: 92px; align-items: center; justify-content: center; gap: 9px; border: 1px dashed #202c3b; border-radius: 6px; background: #090d13; color: #74859c; font-size: 12px; }
.format-empty-state svg { width: 16px; }
.format-output-heading { align-items: flex-end; }
.format-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.format-rule-strip { display: flex; align-items: center; gap: 18px; margin: 24px 0 18px; border: 1px solid var(--line-soft); border-radius: 6px; background: #090e15; padding: 13px 16px; }
.format-rule-strip span { display: flex; align-items: center; gap: 8px; color: #b6c3d3; font-size: 12px; }
.format-rule-strip small { color: #72849c; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.format-rule-strip > svg { width: 13px; color: #3f6eaa; }
.format-result-list { min-height: 92px; }
.format-result-list + .format-notice { margin: 18px 0 0; }

.nine-patch-inline { display: grid; height: 720px; min-height: 520px; max-height: 1100px; grid-template-rows: 60px minmax(0, 1fr) 16px; margin-top: 20px; overflow: hidden; scroll-margin-top: 20px; border: 1px solid #2a3b53; border-radius: 7px; background: #080c12; box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28); animation: nine-patch-open 180ms ease both; }
.nine-patch-inline-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: #0b1018; padding: 0 12px 0 16px; }
.nine-patch-inline-head > div { display: flex; min-width: 0; align-items: center; gap: 11px; }
.nine-patch-inline-head h3 { margin: 0; font-size: 14px; font-weight: 650; }
.nine-patch-inline-head p { margin: 4px 0 0; color: #7b8ba1; font-size: 11px; }
.nine-patch-dialog-mark { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border: 1px solid #285481; border-radius: 5px; background: #0b1c2c; color: #6aaeff; }
.nine-patch-dialog-mark svg { width: 15px; }
.nine-patch-frame-wrap { position: relative; min-height: 0; background: #f5f5f5; }
.nine-patch-frame-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #f5f5f5; }
.nine-patch-loading { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 14px; background: #0a0f16; color: #8797ad; font-size: 13px; }
.nine-patch-loading span { width: 24px; height: 24px; border: 2px solid #233550; border-top-color: #5b9dff; border-radius: 50%; animation: nine-patch-spin 800ms linear infinite; }
.nine-patch-loading p { margin: 0; }
.nine-patch-resize-handle { position: relative; display: grid; width: 100%; height: 16px; place-items: center; border: 0; border-top: 1px solid #1c2a3b; background: #0b111a; padding: 0; cursor: ns-resize; touch-action: none; }
.nine-patch-resize-handle span { display: block; width: 48px; height: 3px; border-radius: 3px; background: #3b4c63; transition: 150ms ease; }
.nine-patch-resize-handle:hover span,
.nine-patch-resize-handle:focus-visible span,
.nine-patch-inline.is-resizing .nine-patch-resize-handle span { width: 64px; background: #5c9df5; }
.nine-patch-inline.is-resizing { user-select: none; }
.nine-patch-inline.is-resizing iframe { pointer-events: none; }
@keyframes nine-patch-open { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes nine-patch-spin { to { transform: rotate(360deg); } }

.file-queue { min-height: 480px; }
.queue-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 4px 2px 20px; }
.queue-head p { margin: 5px 0 0; color: var(--muted-strong); font-size: 12px; }
.queue-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.compact-button { min-height: 36px; padding: 0 11px; font-size: 12px; }
.queue-list { display: grid; gap: 8px; }
.continue-drop-zone { display: flex; min-height: 82px; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; border: 1px dashed #28384d; border-radius: 6px; background: rgba(11, 17, 26, 0.7); padding: 14px 18px; color: #8392a6; transition: 180ms ease; }
.continue-drop-zone.is-dragging { border-color: #4c96ff; background: rgba(28, 67, 120, 0.25); box-shadow: inset 0 0 26px rgba(49, 130, 255, 0.08); }
.continue-drop-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 1px solid #29466c; border-radius: 5px; background: #0b1929; color: #6da8fa; }
.continue-drop-icon svg { width: 17px; }
.continue-drop-zone > span:last-child { display: grid; gap: 5px; }
.continue-drop-zone strong { color: #c5d0df; font-size: 13px; font-weight: 650; }
.continue-drop-zone small { color: #7e8ea4; font-size: 11px; }
.queue-item, .compressed-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 13px; border: 1px solid var(--line-soft); border-radius: 6px; background: #0a0f16; padding: 10px; }
.thumbnail-button { display: block; width: 52px; height: 52px; overflow: hidden; border: 1px solid transparent; border-radius: 5px; background: #111925; padding: 0; transition: 160ms ease; }
.thumbnail-button:hover { border-color: #4f91ea; box-shadow: 0 0 0 3px rgba(58, 140, 255, 0.1); }
.thumbnail-button:focus-visible { outline-offset: 2px; }
.queue-thumb, .compressed-thumb { display: block; width: 100%; height: 100%; border-radius: 4px; background: #111925; object-fit: cover; transition: transform 180ms ease; }
.thumbnail-button:hover img { transform: scale(1.06); }
.queue-meta, .compressed-meta { min-width: 0; }
.queue-meta strong, .compressed-meta strong, .editable-file-name { display: block; overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.editable-file-name { width: 100%; border: 0; background: transparent; padding: 0; color: inherit; font-family: inherit; line-height: 20px; text-align: left; cursor: text; }
.editable-file-name:hover { color: #78b1ff; }
.editable-file-name:focus-visible { border-radius: 3px; outline: 2px solid #3d87e8; outline-offset: 3px; }
.inline-filename-input { display: block; width: 100%; height: 30px; border: 1px solid #3d87e8; border-radius: 4px; background: #08111d; padding: 4px 7px; color: #edf5ff; font-family: inherit; font-size: 13px; font-weight: 600; line-height: 20px; outline: 3px solid rgba(61, 135, 232, 0.16); }
.queue-meta span, .compressed-meta span { display: block; margin-top: 5px; color: #7d8ca1; font-size: 11px; }
.compressed-meta small { display: inline-flex; margin-top: 7px; border: 1px solid #233b5c; border-radius: 3px; background: #0b1828; padding: 3px 6px; color: #82ace4; font-size: 10px; }
.remove-image-button { color: #637187; }

.result-panel { margin-top: 22px; border: 1px solid var(--line); border-radius: 8px; background: #0b1017; padding: 26px; }
.result-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.result-panel-head > div > p:last-child { margin: 7px 0 0; color: var(--muted-strong); font-size: 13px; }
.compressed-list { display: grid; gap: 8px; }
.compressed-item { grid-template-columns: 52px minmax(0, 1fr) minmax(150px, auto) auto; }
.saving { color: var(--success); font-size: 12px; font-weight: 650; text-align: right; }
.download-button { color: #b7c7dc; }

.image-preview-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; overflow: hidden; border: 0; background: rgba(4, 7, 11, 0.98); padding: 0; color: #f4f7fb; }
.image-preview-dialog::backdrop { background: rgba(0, 2, 6, 0.88); backdrop-filter: blur(12px); }
.access-dialog { width: min(520px, calc(100% - 28px)); border: 1px solid #29374a; border-radius: 8px; background: #0b1017; padding: 0; color: #f1f5fa; box-shadow: 0 28px 90px rgba(0, 0, 0, 0.68); }
.access-dialog::backdrop { background: rgba(2, 5, 9, 0.8); backdrop-filter: blur(8px); }
.access-shell { display: grid; gap: 18px; margin: 0; padding: 24px; }
.access-shell > header { display: grid; grid-template-columns: 42px minmax(0, 1fr) 36px; align-items: start; gap: 14px; }
.access-shell > header h2 { margin: 1px 0 5px; font-size: 20px; }
.access-shell > header p:last-child { margin: 0; color: #8290a3; font-size: 13px; line-height: 1.6; }
.access-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #315d90; border-radius: 6px; background: #10243a; color: #78b5ff; }
.access-mark svg { width: 18px; }
.access-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #243040; }
.access-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 11px; color: #8391a5; font: inherit; font-size: 13px; cursor: pointer; }
.access-tabs button.is-active { border-bottom-color: #4b96f5; color: #e8f2ff; }
.access-pane { display: grid; gap: 9px; }
.access-pane label { color: #cbd5e2; font-size: 13px; font-weight: 650; }
.access-pane input { width: 100%; min-width: 0; box-sizing: border-box; font-family: "SFMono-Regular", Consolas, monospace; letter-spacing: 0; text-transform: uppercase; }
.access-pane p, .pairing-shell > p { margin: 0; color: #78879a; font-size: 12px; line-height: 1.6; }
.access-status { min-height: 20px; margin: -4px 0 0; color: #e88989; font-size: 13px; }
.access-shell > footer { display: flex; justify-content: flex-end; gap: 10px; }
.pairing-shell > code { border: 1px solid #2b5687; border-radius: 6px; background: #0c1d30; padding: 18px; color: #8fc2ff; font-family: "SFMono-Regular", Consolas, monospace; font-size: 22px; text-align: center; }
.access-manage-button { justify-content: flex-start; gap: 9px; }
.access-manage-button svg { width: 16px; }
.image-preview-shell { display: grid; height: 100%; grid-template-rows: 66px minmax(0, 1fr) 72px; }
.image-preview-head { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #1b2634; background: rgba(8, 12, 18, 0.92); padding: 0 22px; }
.image-preview-head > div { min-width: 0; }
.image-preview-head h2 { overflow: hidden; margin: 0; font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.image-preview-head p { margin: 5px 0 0; color: #8191a7; font-size: 11px; }
.image-preview-stage { position: relative; display: grid; min-height: 0; place-items: center; overflow: hidden; padding: 28px 88px; touch-action: pan-y; user-select: none; }
.image-preview-figure { display: grid; width: 100%; height: 100%; min-width: 0; min-height: 0; place-items: center; margin: 0; }
.image-preview-figure img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 24px 54px rgba(0, 0, 0, 0.48)); }
.image-preview-nav { position: absolute; top: 50%; z-index: 1; display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid #2b3d55; border-radius: 50%; background: rgba(14, 22, 33, 0.9); color: #c9d8eb; transform: translateY(-50%); transition: 160ms ease; }
.image-preview-nav:hover { border-color: #4e8fe8; background: #14233a; color: #fff; }
.image-preview-nav svg { width: 20px; height: 20px; }
.image-preview-prev { left: 24px; }
.image-preview-next { right: 24px; }
.image-preview-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #1b2634; background: rgba(8, 12, 18, 0.92); padding: 0 22px; }
.image-preview-foot > span { min-width: 54px; color: #91a2b8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.image-preview-foot > div { display: flex; gap: 8px; }
.image-preview-foot .secondary-button { min-width: 102px; }

.link-workspace { border: 1px solid var(--line); border-radius: 8px; background: rgba(12, 16, 23, 0.88); overflow: hidden; box-shadow: 0 28px 80px rgba(0, 0, 0, 0.25); }
.form-section { display: grid; grid-template-columns: 68px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.section-index { display: flex; justify-content: center; border-right: 1px solid var(--line); padding-top: 31px; color: #6897d6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 800; }
.section-body { padding: 30px; }
.section-heading { margin-bottom: 24px; }
.section-heading p { margin: 7px 0 0; color: var(--muted-strong); font-size: 13px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 18px; }
.field { min-width: 0; }
.field + .full-field { margin-top: 22px; }
.field > label, .field-label-row label { display: block; margin-bottom: 9px; color: #bcc7d5; font-size: 13px; font-weight: 650; }
.field label span { color: #5f9cf6; }
.field small { display: block; margin-top: 7px; color: #728198; font-size: 11px; line-height: 1.55; }
.field label .field-optional { display: inline; margin: 0 0 0 6px; color: #728198; font-size: 11px; font-weight: 500; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.recognition-state { display: flex; align-items: center; gap: 5px; color: #7591b8; font-size: 11px; }
.recognition-state svg { width: 11px; }
.recognition-state.is-success { color: var(--success); }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; top: 50%; left: 12px; width: 14px; transform: translateY(-50%); color: #53647c; }
.input-wrap input { padding-left: 38px; }
.form-action-bar { display: flex; min-height: 86px; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 30px; }
.form-status { margin: 0; color: #8797ad; font-size: 12px; }
.form-status.is-error { color: var(--danger); }
.form-status.is-success { color: var(--success); }
.link-results { border-top: 1px solid var(--line); padding: 30px; }
.link-result-item { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 20px; border-top: 1px solid var(--line-soft); padding: 18px 0; }
.link-result-meta { display: flex; align-items: center; gap: 11px; }
.link-result-meta > svg { width: 18px; color: #5e9fff; }
.link-result-meta h3 { margin: 0; font-size: 13px; font-weight: 650; }
.link-result-meta p { margin: 5px 0 0; color: #7f8ea3; font-size: 11px; }
.url-output { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: start; gap: 8px; min-width: 0; }
.url-output code { display: block; min-width: 0; min-height: 42px; border: 1px solid #23334a; border-radius: 5px; background: #080d14; padding: 11px 12px; color: #86b7ff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; white-space: normal; word-break: break-word; }

:root[data-theme="light"] {
  color-scheme: light;
  color: #172033;
  background: #f6f8fc;
  --bg: #f6f8fc;
  --panel: #ffffff;
  --panel-strong: #f3f6fb;
  --line: #d9e1ec;
  --line-soft: #e8edf4;
  --muted: #66758a;
  --muted-strong: #526176;
  --blue: #176ce2;
  --blue-light: #287de9;
  --cyan: #087fa9;
  --danger: #cf3549;
  --success: #09875f;
}
[data-theme="light"] .app-shell { background: linear-gradient(145deg, rgba(33, 113, 230, 0.08) 0, transparent 26%), var(--bg); }
[data-theme="light"] .sidebar,
[data-theme="light"] .mobile-bar { background: rgba(255, 255, 255, 0.94); }
[data-theme="light"] .brand { color: #152033; }
[data-theme="light"] .brand-mark { border-color: #2476e5; background: #eaf3ff; box-shadow: inset 0 0 18px rgba(49, 130, 255, 0.1); }
[data-theme="light"] .brand-mark span { background: #287ce8; }
[data-theme="light"] .brand-mark span:nth-child(2) { background: #0f4f9f; }
[data-theme="light"] .brand-copy small,
[data-theme="light"] .nav-label { color: #65758b; }
[data-theme="light"] .nav-item-action > svg { color: #738198; }
[data-theme="light"] .nav-item-action small,
[data-theme="light"] .nav-item.is-active .nav-item-action small { color: #63738a; }
[data-theme="light"] .nav-item:hover { border-color: #d6e1ef; background: #f4f7fb; }
[data-theme="light"] .nav-item.is-active { border-color: #c6d7ed; background: #edf4fd; box-shadow: inset 3px 0 #2f7ce2; }
[data-theme="light"] .nav-drag-handle { color: #7b899b; }
[data-theme="light"] .nav-drag-handle:hover { background: #dfeaf7; color: #3d638f; }
[data-theme="light"] .nav-item.is-reordering { border-color: #6b9cda; background: rgba(48, 117, 210, 0.07); }
[data-theme="light"] .nav-drag-preview { border-color: #78a7e1; background: #ffffff; box-shadow: 0 18px 38px rgba(50, 72, 102, 0.22), 0 7px 14px rgba(36, 100, 185, 0.14), 0 0 0 1px rgba(58, 117, 194, 0.12); }
[data-theme="light"] .sidebar-foot { color: #65758a; }
[data-theme="light"] .theme-toggle { border-color: #d2dce9; background: #f7f9fc; color: #3c4c62; }
[data-theme="light"] .theme-toggle:hover { border-color: #adc2dd; background: #edf3fa; color: #182438; }
[data-theme="light"] .theme-toggle svg { color: #315f99; }
[data-theme="light"] .nav-group-toggle { color: #69798f; }
[data-theme="light"] .nav-group-toggle:hover { background: #edf3fa; color: #273950; }
[data-theme="light"] .privacy-badge { border-color: #d1dce9; background: #f5f8fc; color: #506078; }
[data-theme="light"] .home-today { border-color: #d9e2ed; background: #ffffff; box-shadow: 0 22px 60px rgba(54, 74, 102, 0.1); }
[data-theme="light"] .home-date-label { color: #5579a6; }
[data-theme="light"] .home-date-primary > strong { color: #18253a; }
[data-theme="light"] .home-date-primary h2 { color: #2a3a50; }
[data-theme="light"] .home-date-primary h2 span:last-child { color: #287ca2; }
[data-theme="light"] .home-date-primary > div > p,
[data-theme="light"] .home-progress-row > div:first-child { color: #67778d; }
[data-theme="light"] .home-almanac { border-color: #e2e8f0; }
[data-theme="light"] .home-almanac > div + div { border-color: #e2e8f0; }
[data-theme="light"] .home-almanac dt { color: #68788e; }
[data-theme="light"] .home-almanac dd { color: #2b3c52; }
[data-theme="light"] .home-progress-row strong { color: #42566f; }
[data-theme="light"] .home-progress-track { background: #e6ebf2; }
[data-theme="light"] .home-group-header h2 { color: #26374d; }
[data-theme="light"] .home-group-header p { color: #66778d; }
[data-theme="light"] .home-group-icon { border-color: #bdd5ee; background: #eaf4ff; color: #2879c4; }
[data-theme="light"] .home-tool-group:nth-child(2) .home-group-icon { border-color: #d2cdee; background: #f1effc; color: #635aaa; }
[data-theme="light"] .home-tool-group:nth-child(3) .home-group-icon { border-color: #bcded2; background: #edf8f4; color: #237b66; }
[data-theme="light"] .home-tool-group:nth-child(4) .home-group-icon { border-color: #e4d4ac; background: #fbf6e9; color: #916b1d; }
[data-theme="light"] .home-tool-entry { border-color: #dde4ed; background: #ffffff; }
[data-theme="light"] .home-tool-entry:hover { border-color: #9dbbdf; background: #f7faff; box-shadow: 0 12px 24px rgba(48, 72, 103, 0.1); }
[data-theme="light"] .home-tool-entry > svg:first-child { color: #4e7faf; }
[data-theme="light"] .home-tool-entry strong { color: #26374d; }
[data-theme="light"] .home-tool-entry small { color: #68798f; }
[data-theme="light"] .home-tool-entry > svg:last-child { color: #8a98aa; }
[data-theme="light"] .workspace-grid,
[data-theme="light"] .format-workflow,
[data-theme="light"] .link-workspace,
[data-theme="light"] .timestamp-panel { background: rgba(255, 255, 255, 0.94); box-shadow: 0 22px 60px rgba(54, 74, 102, 0.1); }
[data-theme="light"] .settings-panel { background: #f7f9fc; }
[data-theme="light"] .drop-zone { border-color: #bccce0; background: linear-gradient(180deg, #f7faff, #f2f6fb); }
[data-theme="light"] .drop-zone:hover,
[data-theme="light"] .drop-zone.is-dragging { border-color: #4389ee; background: #edf5ff; }
[data-theme="light"] .upload-visual,
[data-theme="light"] .format-drop-icon,
[data-theme="light"] .continue-drop-icon,
[data-theme="light"] .timestamp-live-icon,
[data-theme="light"] .timestamp-panel-icon { border-color: #b9d2f0; background: #eaf4ff; color: #1c72dc; }
[data-theme="light"] .secondary-button { border-color: #c7d2e0; background: #f7f9fc; color: #2c3b50; }
[data-theme="light"] .secondary-button:hover { border-color: #9fb4cf; background: #edf3fa; }
[data-theme="light"] .text-button { color: #607089; }
[data-theme="light"] .text-button:hover { color: #182438; }
[data-theme="light"] .icon-button { border-color: #cbd6e4; background: #f7f9fc; color: #35455c; }
[data-theme="light"] .icon-button:hover { border-color: #9fb6d3; background: #edf3fa; }
[data-theme="light"] select,
[data-theme="light"] input,
[data-theme="light"] textarea { border-color: #cbd5e2; background: #ffffff; color: #172033; }
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder { color: #8794a7; }
[data-theme="light"] input[readonly] { background: #f1f4f8; color: #5d6c81; }
[data-theme="light"] .setting-group > label,
[data-theme="light"] .field-label,
[data-theme="light"] .setting-label-row label,
[data-theme="light"] .setting-label-row .field-label,
[data-theme="light"] .field > label,
[data-theme="light"] .field-label-row label { color: #35445a; }
[data-theme="light"] .setting-label-row output { border-color: #b9d0ee; background: #eaf3ff; color: #155fab; }
[data-theme="light"] .range { background: linear-gradient(to right, #3281e7 72%, #d5dde8 72%); }
[data-theme="light"] .range::-webkit-slider-thumb { border-color: #ffffff; background: #2877d9; }
[data-theme="light"] .switch span { background: #cbd4df; }
[data-theme="light"] .switch span::after { background: #ffffff; }
[data-theme="light"] .conversion-spec dt,
[data-theme="light"] .field small,
[data-theme="light"] .format-drop-copy small,
[data-theme="light"] .queue-meta span,
[data-theme="light"] .compressed-meta span,
[data-theme="light"] .link-result-meta p,
[data-theme="light"] .timestamp-live span,
[data-theme="light"] .timestamp-results span { color: #647389; }
[data-theme="light"] .conversion-spec dd,
[data-theme="light"] .format-step-heading strong,
[data-theme="light"] .format-drop-copy strong,
[data-theme="light"] .continue-drop-zone strong,
[data-theme="light"] .format-rule-strip span { color: #334359; }
[data-theme="light"] .format-notice { background: #edf7fc; }
[data-theme="light"] .format-notice p { color: #53677e; }
[data-theme="light"] .format-maker-step { background: linear-gradient(110deg, rgba(31, 91, 178, 0.07), transparent 54%); }
[data-theme="light"] .nine-patch-inline { border-color: #c8d5e5; background: #ffffff; box-shadow: 0 18px 42px rgba(47, 68, 96, 0.13); }
[data-theme="light"] .nine-patch-inline-head { background: #f7f9fc; }
[data-theme="light"] .nine-patch-resize-handle { border-top-color: #dbe3ed; background: #f4f7fb; }
[data-theme="light"] .nine-patch-resize-handle span { background: #a7b5c6; }
[data-theme="light"] .format-empty-state,
[data-theme="light"] .format-rule-strip,
[data-theme="light"] .queue-item,
[data-theme="light"] .compressed-item,
[data-theme="light"] .result-panel,
[data-theme="light"] .timestamp-results > div { background: #f8fafc; }
[data-theme="light"] .continue-drop-zone { border-color: #c2cfdf; background: rgba(245, 248, 252, 0.9); color: #5e6e84; }
[data-theme="light"] .thumbnail-button,
[data-theme="light"] .queue-thumb,
[data-theme="light"] .compressed-thumb { background: #edf1f6; }
[data-theme="light"] .editable-file-name { color: #27384e; }
[data-theme="light"] .editable-file-name:hover { color: #1768c4; }
[data-theme="light"] .inline-filename-input { border-color: #2d78d2; background: #ffffff; color: #23354c; outline-color: rgba(45, 120, 210, 0.14); }
[data-theme="light"] .compressed-meta small { border-color: #c7d7eb; background: #eaf3ff; color: #336797; }
[data-theme="light"] .url-output code { border-color: #c6d4e5; background: #f4f8fd; color: #145cae; }
[data-theme="light"] .timestamp-live { border-color: #c9d7e7; background: linear-gradient(105deg, rgba(38, 106, 202, 0.1), rgba(255, 255, 255, 0.95) 48%); }
[data-theme="light"] .timestamp-live code,
[data-theme="light"] .timestamp-results code { color: #155eaf; }
[data-theme="light"] .timestamp-explanation { color: #5f7087; }
[data-theme="light"] .timestamp-shortcuts { border-color: #ccd8e6; background: #f7f9fc; }
[data-theme="light"] .json-workspace,
[data-theme="light"] .json-editor-panel { background: #ffffff; }
[data-theme="light"] .json-toolbar,
[data-theme="light"] .json-editor-head,
[data-theme="light"] .json-status { border-color: #dce4ee; background: #f7f9fc; }
[data-theme="light"] .json-editor-head span { color: #2b3b50; }
[data-theme="light"] .json-editor-panel textarea[readonly] { background: #f5f8fc; color: #245b99; }
[data-theme="light"] .toast { border-color: #acd8c7; background: #eefaf5; color: #176b50; }
[data-theme="light"] .access-dialog { border-color: #cbd7e5; background: #ffffff; color: #172033; box-shadow: 0 28px 80px rgba(46, 66, 94, 0.22); }
[data-theme="light"] .access-shell > header p:last-child,
[data-theme="light"] .access-pane p,
[data-theme="light"] .pairing-shell > p { color: #647389; }
[data-theme="light"] .access-mark { border-color: #b9d3f1; background: #eaf4ff; color: #176bcb; }
[data-theme="light"] .access-tabs { border-bottom-color: #d7e0eb; }
[data-theme="light"] .access-tabs button { color: #68788e; }
[data-theme="light"] .access-tabs button.is-active { color: #174f8d; }
[data-theme="light"] .access-pane label { color: #35445a; }
[data-theme="light"] .pairing-shell > code { border-color: #b9d1ed; background: #edf5ff; color: #155da9; }

.timestamp-workspace { display: grid; gap: 18px; }
.timestamp-live { display: grid; min-height: 94px; grid-template-columns: 48px minmax(0, 1fr) minmax(170px, auto) minmax(190px, auto); align-items: center; gap: 16px; border: 1px solid #26364d; border-radius: 8px; background: linear-gradient(105deg, rgba(38, 106, 202, 0.16), rgba(12, 16, 23, 0.88) 45%); padding: 20px 24px; }
.timestamp-live-icon, .timestamp-panel-icon { display: grid; place-items: center; border: 1px solid #2b5f9e; border-radius: 6px; background: #0b1b30; color: #72adff; }
.timestamp-live-icon { width: 48px; height: 48px; }
.timestamp-live-icon svg { width: 20px; }
.timestamp-live > div:nth-child(2), .timestamp-live-unix { display: grid; gap: 5px; }
.timestamp-live span, .timestamp-results span { color: #8393aa; font-size: 11px; font-weight: 650; }
.timestamp-live strong { font-size: 20px; font-weight: 620; }
.timestamp-live-unix { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
.timestamp-live-unix > span { grid-column: 1 / -1; }
.timestamp-live code, .timestamp-results code { color: #8bbaff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.timestamp-live-unix .icon-button { width: 34px; height: 34px; flex-basis: 34px; }
.timestamp-shortcuts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; border: 1px solid var(--line); border-radius: 7px; background: #0b1017; padding: 12px 14px; }
.timestamp-shortcuts > span { margin-right: 3px; color: #7d8ea4; font-size: var(--text-meta); font-weight: 700; }
.timestamp-shortcuts .secondary-button { min-height: 34px; padding: 0 11px; }
.timestamp-converter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.timestamp-panel { display: flex; min-width: 0; min-height: 430px; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; background: rgba(12, 16, 23, 0.88); padding: 28px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2); }
.timestamp-panel-head { display: flex; align-items: center; gap: 13px; margin-bottom: 28px; }
.timestamp-panel-icon { width: 42px; height: 42px; flex: 0 0 42px; }
.timestamp-panel-icon svg { width: 18px; }
.timestamp-panel-head .eyebrow { margin-bottom: 4px; }
.timestamp-panel-head h2 { margin: 0; font-size: 18px; font-weight: 650; }
.timestamp-panel .field { margin-bottom: 22px; }
.timestamp-actions { display: flex; justify-content: space-between; gap: 10px; }
.timestamp-actions-end { justify-content: flex-end; }
.timestamp-results { display: grid; gap: 9px; margin-top: auto; padding-top: 26px; }
.timestamp-results > div { display: grid; min-height: 58px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 12px; border: 1px solid var(--line-soft); border-radius: 6px; background: #090e15; padding: 9px 10px 9px 14px; }
.timestamp-results span { grid-column: 1; }
.timestamp-results code { grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timestamp-results .icon-button { grid-column: 2; grid-row: 1 / 3; }
.timestamp-explanation { display: flex; align-items: flex-start; gap: 8px; margin: 2px 3px 0; color: #7f8fa5; font-size: 13px; line-height: 1.7; }
.timestamp-explanation svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 3px; color: #5f9eea; }

.json-workspace { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: rgba(12, 16, 23, 0.9); box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24); }
.json-mobile-tabs { display: none; }
.json-toolbar { display: flex; min-height: 72px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: #0b1017; padding: 14px 18px; }
.json-primary-actions { display: flex; align-items: center; gap: 8px; }
.json-toolbar .primary-button { min-height: 40px; }
.json-indent-control { display: flex; align-items: center; gap: 8px; margin-left: auto; color: #8595aa; font-size: 12px; }
.json-indent-control select { width: 104px; height: 40px; padding: 0 10px; }
.json-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 540px; }
.json-editor-panel { display: grid; min-width: 0; grid-template-rows: 62px minmax(0, 1fr); background: #090e15; }
.json-editor-panel + .json-editor-panel { border-left: 1px solid var(--line); }
.json-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: #0c1119; padding: 10px 14px 10px 18px; }
.json-editor-head > div:first-child { display: grid; gap: 3px; }
.json-editor-head span { color: #c7d2df; font-size: 13px; font-weight: 700; }
.json-editor-head small { color: #69798f; font-size: 10px; }
.json-output-actions { display: flex !important; gap: 7px !important; }
.json-editor-panel textarea { width: 100%; min-height: 0; height: 100%; border: 0; border-radius: 0; background: transparent; padding: 18px; color: #d7e2ef; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.7; resize: none; tab-size: 2; }
.json-editor-panel textarea:focus { border-color: transparent; box-shadow: inset 0 0 0 1px rgba(69, 139, 233, 0.65); }
.json-editor-panel textarea[readonly] { background: #080d13; color: #9fc4f4; }
.json-status { display: flex; min-height: 48px; align-items: center; gap: 9px; border-top: 1px solid var(--line); background: #0b1017; padding: 10px 18px; color: #75859b; font-size: 12px; }
.json-status svg { width: 14px; height: 14px; }
.json-status[data-state="success"] { color: #62cfa7; }
.json-status[data-state="error"] { color: #eb8793; }

.utility-workspace { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: rgba(12, 16, 23, 0.9); box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24); }
.utility-toolbar { display: grid; gap: 12px; border-bottom: 1px solid var(--line); background: #0b1017; padding: 16px 18px; }
.utility-action-group { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 8px; }
.utility-action-group > span { width: 58px; flex: 0 0 58px; color: #718198; font-size: var(--text-meta); font-weight: 700; }
.utility-action-group .secondary-button { min-height: 36px; padding: 0 12px; }
.utility-replace-bar { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto auto; align-items: end; gap: 10px; border-bottom: 1px solid var(--line); background: #0c121b; padding: 14px 18px; }
.utility-replace-bar label:not(.utility-check), .utility-wide-field, .utility-form-row label, .color-input-row label, .generator-settings label:not(.utility-check) { display: grid; min-width: 0; gap: 7px; color: #8797ad; font-size: var(--text-meta); font-weight: 650; }
.utility-replace-bar input, .utility-wide-field input, .utility-form-row input, .utility-form-row select, .color-input-row input[type="text"], .generator-settings input[type="number"] { width: 100%; height: 42px; }
.utility-check { display: inline-flex; min-height: 40px; align-items: center; gap: 7px; color: #9aa9bb; font-size: var(--text-control); white-space: nowrap; }
.utility-check input { width: 16px; height: 16px; accent-color: var(--blue); }
.utility-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 480px; }
.utility-editor-grid.compact { min-height: 410px; border-top: 1px solid var(--line); }
.utility-editor-panel { display: grid; min-width: 0; grid-template-rows: 58px minmax(0, 1fr); background: #090e15; }
label.utility-editor-panel { grid-template-rows: 52px minmax(0, 1fr); }
.utility-editor-panel + .utility-editor-panel { border-left: 1px solid var(--line); }
.utility-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: #0c1119; padding: 9px 13px 9px 18px; }
.utility-editor-head > div:first-child { display: grid; gap: 4px; }
.utility-editor-head strong, .utility-editor-label { color: #cad5e2; font-size: var(--text-control); font-weight: 700; }
.utility-editor-head small { color: #718198; font-size: var(--text-meta); }
.utility-head-actions { display: flex; gap: 7px; }
.utility-editor-label { display: flex; align-items: center; border-bottom: 1px solid var(--line); background: #0c1119; padding: 0 18px; }
.utility-editor-panel textarea, .utility-wide-field textarea { width: 100%; min-height: 0; border: 0; border-radius: 0; background: transparent; padding: 18px; color: #d7e2ef; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.75; resize: none; }
.utility-editor-panel textarea:focus, .utility-wide-field textarea:focus { border-color: transparent; box-shadow: inset 0 0 0 1px rgba(69, 139, 233, 0.65); }
.utility-editor-panel textarea[readonly] { background: #080d13; color: #a9ccf7; }
.utility-status { display: flex; min-height: 48px; align-items: center; gap: 9px; border-top: 1px solid var(--line); background: #0b1017; padding: 10px 18px; color: #75859b; font-size: var(--text-meta); }
.utility-status svg { width: 14px; height: 14px; }
.utility-status[data-state="success"] { color: #62cfa7; }
.utility-status[data-state="error"] { color: #eb8793; }
.utility-tabs { display: flex; min-height: 62px; align-items: center; gap: 5px; overflow-x: auto; border-bottom: 1px solid var(--line); background: #0b1017; padding: 10px 14px; }
.utility-tabs button { display: inline-flex; min-width: max-content; min-height: 40px; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 5px; background: transparent; padding: 0 14px; color: #7f90a7; font-weight: 650; }
.utility-tabs button svg { width: 15px; height: 15px; }
.utility-tabs button:hover { background: #111a27; color: #c6d1df; }
.utility-tabs button.is-active { border-color: #2f5f9b; background: #14243a; color: #9ec7ff; }
.utility-tab-drag-handle { display: grid; width: 24px; height: 28px; place-items: center; margin: 0 -7px 0 2px; border-radius: 4px; color: #52637a; cursor: grab; touch-action: none; }
.utility-tab-drag-handle:hover { background: rgba(91, 137, 201, 0.12); color: #91acd0; }
.utility-tab-drag-handle svg { width: 14px !important; height: 14px !important; pointer-events: none; }
.utility-tabs button.is-reordering { border-style: dashed; opacity: 0.28; }
.utility-tab-drag-preview { position: fixed; z-index: 80; display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; border: 1px solid #4f8fe8 !important; border-radius: 5px; background: #14243a !important; padding: 0 14px; color: #b9d7ff !important; font-weight: 650; white-space: nowrap; pointer-events: none; transform: scale(1.04) rotate(0.5deg); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38), 0 5px 12px rgba(23, 92, 192, 0.24); }
.utility-tab-drag-preview > svg { width: 15px; height: 15px; flex: 0 0 15px; }
.utility-tab-drag-preview > span { display: inline; min-width: 0; }
.utility-tab-panel { min-height: 470px; }
.utility-inline-actions { display: flex; min-height: 72px; align-items: center; flex-wrap: wrap; gap: 9px; background: #0c121b; padding: 14px 18px; }
.utility-inline-actions .utility-check { margin-left: auto; }
.utility-form-panel { display: grid; align-content: start; gap: 18px; padding: 28px; }
.utility-wide-field textarea { min-height: 180px; border: 1px solid var(--line); border-radius: 6px; background: #090e15; resize: vertical; }
.utility-result-line { display: grid; min-height: 54px; grid-template-columns: minmax(0, 1fr) 38px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 6px; background: #090e15; padding: 8px 9px 8px 14px; }
.utility-result-line :is(span, code) { overflow-wrap: anywhere; color: #9ec7fa; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.65; }
.utility-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: #74859b; font-size: var(--text-meta); line-height: 1.65; }
.utility-note svg { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 3px; color: #5f9eea; }
.generator-grid { display: grid; gap: 14px; }
.generator-grid article { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 7px; background: #0b1017; padding: 18px; }
.generator-grid article > div:first-child, .generator-settings { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.generator-grid article > div:first-child > span { color: #c2cedc; font-size: var(--text-control); font-weight: 700; }
.generator-settings label:first-child { width: 130px; }
.utility-form-row, .color-input-row { display: flex; align-items: end; gap: 12px; }
.utility-form-row > label:first-child { width: 160px; flex: 0 0 160px; }
.utility-grow { min-width: 0; flex: 1; }
.conversion-result-list { display: grid; gap: 8px; }
.conversion-result-item { display: grid; min-height: 58px; grid-template-columns: 150px minmax(0, 1fr) 38px; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 6px; background: #090e15; padding: 8px 9px 8px 15px; }
.conversion-result-item span { color: #7f90a6; font-size: var(--text-meta); font-weight: 650; }
.conversion-result-item code { overflow-wrap: anywhere; color: #a8cdfb; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.6; }
.color-input-row > input[type="color"] { width: 58px; height: 58px; flex: 0 0 58px; border: 1px solid #334259; border-radius: 6px; background: #0b1017; padding: 5px; }
.color-preview { position: relative; height: 96px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: conic-gradient(#1b2430 25%, #111822 0 50%, #1b2430 0 75%, #111822 0) 0 0 / 20px 20px; }
.color-preview > span { position: absolute; inset: 0; background: #3182ff; }
.color-opacity-field { width: 190px; flex: 0 0 190px; }
.color-opacity-field > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.color-opacity-field output { color: #83b7fb; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--text-control); }
.color-opacity-field .range { width: 100%; margin: 0; }
.color-history { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 20px; }
.color-history > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.color-history h3 { margin: 0; color: #c8d3e0; font-size: 14px; font-weight: 700; }
.color-history header p { margin: 5px 0 0; color: #718198; font-size: var(--text-meta); }
.color-history-list { display: grid; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.color-history-item { display: grid; min-width: 0; min-height: 58px; grid-template-columns: 42px minmax(0, 1fr) auto 22px; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid var(--line-soft); background: #090e15; padding: 8px 13px; color: inherit; text-align: left; }
.color-history-item:last-child { border-bottom: 0; }
.color-history-item:hover { background: #0f1722; }
.color-history-swatch { position: relative; width: 42px; height: 36px; overflow: hidden; border: 1px solid #34445a; border-radius: 5px; background: conic-gradient(#26313f 25%, #151d27 0 50%, #26313f 0 75%, #151d27 0) 0 0 / 12px 12px; }
.color-history-swatch::after { position: absolute; inset: 0; background: var(--history-color); content: ""; }
.color-history-copy { display: grid; min-width: 0; gap: 4px; }
.color-history-copy code { overflow: hidden; color: #afcff7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.color-history-copy small, .color-history-time { color: #718198; font-size: var(--text-meta); }
.color-history-item > svg { width: 15px; height: 15px; color: #566b86; }
.color-history-empty { margin: 0; padding: 24px; color: #718198; font-size: var(--text-control); text-align: center; }

[data-theme="light"] .utility-workspace { background: rgba(255, 255, 255, 0.96); box-shadow: 0 22px 60px rgba(54, 74, 102, 0.1); }
[data-theme="light"] :is(.utility-toolbar, .utility-tabs, .utility-status) { background: #f7f9fc; }
[data-theme="light"] :is(.utility-replace-bar, .utility-inline-actions) { background: #f2f6fb; }
[data-theme="light"] :is(.utility-editor-panel, .utility-result-line, .conversion-result-item) { background: #fff; }
[data-theme="light"] :is(.utility-editor-head, .utility-editor-label) { background: #f7f9fc; }
[data-theme="light"] .utility-editor-panel textarea { color: #233247; }
[data-theme="light"] .utility-editor-panel textarea[readonly] { background: #f6f9fc; color: #185fae; }
[data-theme="light"] .utility-tabs button:hover { background: #edf3fa; color: #30455f; }
[data-theme="light"] .utility-tabs button.is-active { border-color: #a8c8ee; background: #e8f2fe; color: #185da8; }
[data-theme="light"] .utility-tab-drag-preview { border-color: #6097d5 !important; background: #e8f2fe !important; color: #174f8c !important; box-shadow: 0 16px 34px rgba(43, 72, 108, 0.2); }
[data-theme="light"] .generator-grid article { background: #f8fafc; }
[data-theme="light"] .conversion-result-item code, [data-theme="light"] .utility-result-line :is(span, code) { color: #155fae; }
[data-theme="light"] .color-history h3 { color: #24364c; }
[data-theme="light"] .color-history-item { background: #fff; }
[data-theme="light"] .color-history-item:hover { background: #f3f7fc; }
[data-theme="light"] .color-history-copy code { color: #155fae; }
[data-theme="light"] .color-preview { background: conic-gradient(#e2e8f0 25%, #f7f9fc 0 50%, #e2e8f0 0 75%, #f7f9fc 0) 0 0 / 20px 20px; }
[data-theme="light"] .color-history-swatch { background: conic-gradient(#dbe3ec 25%, #f8fafc 0 50%, #dbe3ec 0 75%, #f8fafc 0) 0 0 / 12px 12px; }

#translationView { display: flex; min-height: 100svh; flex-direction: column; padding-bottom: 24px; }
#translationView[hidden] { display: none; }
#translationView .view-header { flex: 0 0 auto; }
.translation-embed-shell { display: grid; min-height: 480px; flex: 1 1 auto; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: #090d13; box-shadow: 0 28px 80px rgba(0, 0, 0, 0.25); }
.translation-embed-shell:focus-visible { outline: 0; }
.translation-embed-head { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: #0c1119; padding: 12px 16px 12px 20px; }
.translation-tabs { display: flex; min-width: 0; align-self: stretch; gap: 6px; }
.translation-tab { position: relative; display: flex; min-width: 150px; align-items: center; gap: 10px; border: 0; border-radius: 6px; background: transparent; padding: 8px 12px; color: #77889f; text-align: left; cursor: pointer; transition: 160ms ease; }
.translation-tab::after { position: absolute; right: 12px; bottom: -13px; left: 12px; height: 2px; background: #5c9ff5; content: ""; opacity: 0; transform: scaleX(0.55); transition: 160ms ease; }
.translation-tab:hover { background: rgba(91, 155, 239, 0.08); color: #c5d2e3; }
.translation-tab.is-active { background: rgba(91, 155, 239, 0.11); color: #edf4fd; }
.translation-tab.is-active::after { opacity: 1; transform: scaleX(1); }
.translation-tab > span:last-child { display: grid; gap: 3px; }
.translation-tab strong { font-size: 14px; font-weight: 700; }
.translation-tab small { color: #71839a; font-size: 10px; }
.translation-provider-mark { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 1px solid #2f68ad; border-radius: 6px; background: #0b1b30; color: #7db5ff; font-size: 15px; font-weight: 800; }
.translation-provider-mark :is(img, svg) { display: block; width: 22px; height: 22px; fill: #1677ff; }
.translation-provider-mark-google { border-color: #315c91; background: #101c2c; }
.translation-provider-mark-deepl { border-color: #355b82; background: #0c2034; }
.translation-provider-mark-deepl :is(img, svg) { fill: #55b7ef; }
.translation-embed-actions { display: flex; align-items: center; gap: 8px; }
.translation-state-label { border: 1px solid #2b394d; border-radius: 4px; background: #0d141e; padding: 5px 8px; color: #8393a9; font-size: 10px; font-weight: 750; }
.translation-embed-shell[data-state="loading"] .translation-state-label { border-color: #27548b; color: #7cb4fb; }
.translation-embed-shell[data-state="ready"] .translation-state-label { border-color: #285b49; color: #6ed3ac; }
.translation-embed-shell[data-state="error"] .translation-state-label { border-color: #653a3f; color: #e9a1a8; }
.translation-frame-wrap { position: relative; min-width: 0; min-height: 0; background: #f5f7fa; }
.translation-frame-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.translation-frame-wrap iframe[hidden] { display: none; }
.google-translation-panel { position: absolute; inset: 0; overflow: auto; background: #090e15; padding: 18px; }
.google-translation-panel[hidden] { display: none; }
.google-translation-panel form { display: grid; height: 100%; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; }
.google-translation-toolbar { display: grid; grid-template-columns: minmax(140px, 190px) 38px minmax(140px, 190px) auto; align-items: end; gap: 10px; }
.google-translation-toolbar label { display: grid; gap: 6px; }
.google-translation-toolbar label > span, .google-translation-pane > span, .google-translation-pane > div > span { color: #8ea0b7; font-size: 11px; font-weight: 700; }
.google-translation-toolbar .icon-button { margin-bottom: 2px; }
.google-translation-toolbar .primary-button { justify-self: end; }
.google-translation-columns { display: grid; min-height: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.google-translation-pane { display: grid; min-height: 0; grid-template-rows: auto minmax(0, 1fr); gap: 7px; }
.google-translation-pane > div { display: flex; min-height: 30px; align-items: center; justify-content: space-between; }
.google-translation-pane > span { display: flex; min-height: 30px; align-items: center; }
.google-translation-pane textarea { min-height: 0; height: 100%; resize: none; font-size: 14px; }
.google-translation-pane textarea[readonly] { background: #0d141e; }
.google-translation-status { margin: 0; color: #71839a; font-size: 11px; }
.google-translation-status.is-error { color: #e9a1a8; }
.google-translation-status.is-success { color: #6ed3ac; }
.translation-frame-loading { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 14px; background: #090e15; color: #8797ad; font-size: 13px; text-align: center; }
.translation-frame-loading[hidden] { display: none; }
.translation-frame-loading span { width: 26px; height: 26px; border: 2px solid #25364d; border-top-color: #63a4ff; border-radius: 50%; animation: translation-frame-spin 800ms linear infinite; }
.translation-frame-loading p { max-width: 420px; margin: 0; line-height: 1.7; }
.translation-embed-shell[data-state="error"] .translation-frame-loading span { display: none; }
.translation-embed-shell[data-state="error"] .translation-frame-loading p { color: #e9a1a8; font-size: 16px; font-weight: 700; }
.translation-embed-shell > footer { display: flex; min-height: 48px; align-items: center; gap: 8px; border-top: 1px solid var(--line); background: #0b1018; padding: 10px 18px; color: #71839a; font-size: 11px; line-height: 1.55; }
.translation-embed-shell > footer svg { width: 14px; height: 14px; flex: 0 0 14px; color: #5f9eea; }
@keyframes translation-frame-spin { to { transform: rotate(360deg); } }

[data-theme="light"] .translation-embed-shell { background: #fff; box-shadow: 0 22px 60px rgba(54, 74, 102, 0.1); }
[data-theme="light"] .translation-embed-head,
[data-theme="light"] .translation-embed-shell > footer { background: #f7f9fc; }
[data-theme="light"] .translation-provider-mark { border-color: #a9c8ee; background: #edf5ff; color: #1769c5; }
[data-theme="light"] .translation-provider-mark-google { border-color: #b6cbed; background: #f1f6fd; }
[data-theme="light"] .translation-provider-mark-deepl { border-color: #b6cde3; background: #eef7fc; }
[data-theme="light"] .translation-tab { color: #6b7d93; }
[data-theme="light"] .translation-tab:hover { background: #edf4fc; color: #25415f; }
[data-theme="light"] .translation-tab.is-active { background: #e7f1fd; color: #142c48; }
[data-theme="light"] .translation-state-label { border-color: #cfdae7; background: #f5f8fc; color: #63758c; }
[data-theme="light"] .translation-frame-loading { background: #f7f9fc; color: #65778e; }
[data-theme="light"] .google-translation-panel { background: #f7f9fc; }
[data-theme="light"] .google-translation-pane textarea[readonly] { background: #f0f4f9; }

.calendar-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 330px; border: 1px solid var(--line); border-radius: 8px; background: rgba(12, 16, 23, 0.88); overflow: hidden; box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24); }
.calendar-panel { min-width: 0; padding: 24px; }
.calendar-toolbar { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 16px; margin-bottom: 22px; }
.calendar-toolbar > div:nth-child(2) { display: grid; gap: 4px; text-align: center; }
.calendar-toolbar strong { font-size: 20px; font-weight: 650; }
.calendar-toolbar span { color: var(--muted); font-size: 11px; }
.calendar-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.calendar-toolbar .icon-button { width: 40px; height: 40px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { margin-bottom: 7px; color: #708096; font-size: 11px; font-weight: 700; text-align: center; }
.calendar-weekdays span { padding: 6px 0; }
.calendar-day { position: relative; display: grid; min-width: 0; min-height: 74px; align-content: center; justify-items: center; gap: 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; padding: 8px 3px; transition: 150ms ease; }
.calendar-day:hover { border-color: #2a405d; background: #101925; }
.calendar-day > span { font-size: 15px; font-weight: 620; }
.calendar-day small { width: 100%; overflow: hidden; color: #7d8da3; font-size: 11px; line-height: 1.3; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.calendar-day small.is-special { color: #69a7ff; }
.calendar-day.is-outside { color: #4d596b; opacity: 0.62; }
.calendar-day.is-today::after { position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); content: ""; }
.calendar-day.is-selected { border-color: #347ee1; background: linear-gradient(145deg, rgba(43, 121, 235, 0.25), rgba(20, 45, 78, 0.36)); box-shadow: inset 0 0 0 1px rgba(110, 168, 255, 0.1); }
.calendar-day.is-selected > span { color: #a9ceff; }
.calendar-detail { display: flex; min-width: 0; flex-direction: column; border-left: 1px solid var(--line); background: #090e15; padding: 28px 24px; }
.calendar-date-hero { padding-bottom: 22px; border-bottom: 1px solid var(--line-soft); }
.calendar-date-hero > span { color: #7890af; font-size: 12px; }
.calendar-date-hero > strong { display: block; margin: 6px 0 0; font-size: 54px; font-weight: 550; line-height: 1; }
.calendar-date-hero p { margin: 11px 0 5px; color: var(--muted-strong); font-size: 13px; }
.calendar-date-hero b { color: #76acfa; font-size: 14px; font-weight: 620; }
.calendar-festival { margin-top: 14px; border: 1px solid #264a75; border-radius: 5px; background: #0c1b2d; padding: 9px 11px; color: #82b8ff; font-size: 12px; line-height: 1.5; }
.calendar-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 16px; margin: 21px 0; }
.calendar-facts div { min-width: 0; }
.calendar-facts dt { margin-bottom: 4px; color: #68798f; font-size: 10px; }
.calendar-facts dd { margin: 0; color: #c8d2df; font-size: 12px; line-height: 1.5; }
.calendar-advice { display: grid; gap: 12px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.calendar-advice > div { display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: start; gap: 10px; }
.calendar-advice p { margin: 1px 0 0; color: #99a8ba; font-size: 11px; line-height: 1.7; }
.advice-label { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 4px; font-size: 11px; font-weight: 800; }
.advice-label.is-good { background: rgba(56, 196, 147, 0.13); color: #5cddb0; }
.advice-label.is-avoid { background: rgba(255, 101, 121, 0.12); color: #ff8191; }
.source-note { display: flex; align-items: center; gap: 8px; margin: 15px 3px 0; color: #728198; font-size: 11px; line-height: 1.6; }
.source-note svg { width: 14px; flex: 0 0 14px; }
.calendar-error { grid-column: 1 / -1; padding: 40px; color: var(--danger); text-align: center; }

.fortune-workspace { display: grid; grid-template-columns: 330px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 8px; background: rgba(12, 16, 23, 0.88); overflow: hidden; box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24); }
.fortune-input-panel { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #090e15; padding: 30px 26px; }
.fortune-date { display: grid; gap: 5px; margin-bottom: 34px; }
.fortune-date span { color: #718198; font-size: 11px; }
.fortune-date strong { font-size: 18px; font-weight: 650; }
.fortune-input-panel .field + .field { margin-top: 20px; }
.fortune-input-panel .primary-button { width: 100%; margin-top: 8px; }
.fortune-birth-field { margin-bottom: 18px; }
.fortune-date-selects { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.fortune-date-selects label { min-width: 0; }
.fortune-date-selects select { height: 44px; padding: 0 9px; }
.fortune-date-selects select:disabled { cursor: not-allowed; opacity: 0.45; }
.fortune-form-status { min-height: 18px; margin: 9px 0 0; color: var(--danger); font-size: 11px; line-height: 1.5; }
.fortune-disclaimer { display: flex; align-items: flex-start; gap: 8px; margin: auto 0 0; padding-top: 28px; color: #68788d; font-size: 11px; line-height: 1.65; }
.fortune-disclaimer svg { width: 14px; flex: 0 0 14px; margin-top: 2px; }
.fortune-result { min-width: 0; min-height: 620px; padding: 38px; }
.fortune-overall { display: grid; grid-template-columns: 142px minmax(0, 1fr); align-items: center; gap: 30px; padding-bottom: 30px; border-bottom: 1px solid var(--line-soft); }
.fortune-score-ring { --score: 0deg; position: relative; display: grid; width: 138px; height: 138px; place-content: center; border-radius: 50%; background: radial-gradient(circle at center, #0c121b 58%, transparent 59%), conic-gradient(#46a2ff var(--score), #1b2736 0); text-align: center; }
.fortune-score-ring::after { position: absolute; inset: 8px; border: 1px solid rgba(111, 174, 255, 0.14); border-radius: 50%; content: ""; }
.fortune-score-ring strong { font-size: 38px; font-weight: 550; line-height: 1; }
.fortune-score-ring span { margin-top: 6px; color: #7c8ea5; font-size: 10px; }
.fortune-overall h2 { margin: 0 0 10px; font-size: 22px; font-weight: 650; }
.fortune-overall > div:last-child > p:last-child { max-width: 470px; margin: 0; color: var(--muted-strong); font-size: 13px; line-height: 1.75; }
.fortune-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 28px; padding: 30px 0; }
.fortune-metrics > div { display: grid; grid-template-columns: 38px minmax(0, 1fr) 30px; align-items: center; gap: 10px; }
.fortune-metrics span { color: #8b9ab0; font-size: 11px; }
.fortune-metrics > div > div { height: 5px; overflow: hidden; border-radius: 4px; background: #1a2432; }
.fortune-metrics i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #327fe8, #59c9f1); }
.fortune-metrics strong { color: #a9c9ef; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; text-align: right; }
.fortune-lucky { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fortune-lucky > div { display: grid; min-width: 0; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 2px 9px; border: 1px solid var(--line-soft); border-radius: 6px; background: #090e15; padding: 13px; }
.fortune-lucky svg { grid-row: 1 / 3; width: 17px; color: #64a4ff; }
.fortune-lucky span { color: #718198; font-size: 10px; }
.fortune-lucky strong { overflow: hidden; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.fortune-insights { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.fortune-insights article { min-width: 0; border: 1px solid var(--line-soft); border-radius: 6px; background: rgba(9, 14, 21, 0.62); padding: 15px; }
.fortune-insights span { display: flex; align-items: center; gap: 7px; color: #86b7f7; font-size: 11px; font-weight: 700; }
.fortune-insights svg { width: 14px; }
.fortune-insights p { margin: 9px 0 0; color: #98a8bb; font-size: 12px; line-height: 1.7; }
.fortune-result blockquote { margin: 20px 0 0; border-left: 2px solid #3888ef; padding: 3px 0 3px 16px; color: #bdc9d8; font-size: 14px; line-height: 1.75; }
.fortune-basis { display: flex; align-items: flex-start; gap: 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.fortune-basis > span { flex: 0 0 auto; padding-top: 4px; color: #718198; font-size: 10px; }
.fortune-basis > div { display: flex; flex-wrap: wrap; gap: 6px; }
.fortune-basis em { border: 1px solid #27374b; border-radius: 4px; background: #0b121c; padding: 4px 7px; color: #91a6bf; font-size: 10px; font-style: normal; white-space: nowrap; }

.food-workspace { display: grid; min-height: 650px; grid-template-columns: 330px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 8px; background: rgba(12, 16, 23, 0.88); overflow: hidden; box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24); }
.food-control-panel { display: flex; min-width: 0; flex-direction: column; border-right: 1px solid var(--line); background: #090e15; padding: 28px 25px; }
.food-location-state { display: grid; min-width: 0; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 18px; }
.food-location-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #29466d; border-radius: 6px; background: #0d1b2d; color: #6ba9ff; }
.food-location-icon svg { width: 18px; }
.food-location-state div { display: grid; min-width: 0; gap: 5px; }
.food-location-state small { color: #718198; font-size: 10px; }
.food-location-state strong { overflow: hidden; font-size: 13px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.food-control-panel > .primary-button { width: 100%; }
.food-separator { display: flex; align-items: center; gap: 10px; margin: 24px 0 19px; color: #637189; font-size: 10px; }
.food-separator::before, .food-separator::after { height: 1px; flex: 1; background: var(--line-soft); content: ""; }
.food-place-form > label, .food-filter-grid label > span { display: block; margin-bottom: 9px; color: #b9c4d3; font-size: 12px; font-weight: 650; }
.food-place-form > div { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 7px; }
.food-place-form input { min-width: 0; height: 42px; }
.food-place-form .icon-button { width: 42px; height: 42px; }
.food-filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 19px; }
.food-filter-grid label { min-width: 0; }
.food-filter-grid select { width: 100%; height: 42px; padding: 0 9px; }
.food-random-button { width: 100%; margin-top: 20px; }
.food-status { min-height: 38px; margin: 12px 0 0; color: #8b9bb0; font-size: 11px; line-height: 1.65; }
.food-status.is-error { color: #ff8795; }
.food-privacy { display: flex; align-items: flex-start; gap: 8px; margin: auto 0 0; padding-top: 28px; color: #68788d; font-size: 10px; line-height: 1.6; }
.food-privacy svg { width: 13px; flex: 0 0 13px; margin-top: 1px; }
.food-results-panel { min-width: 0; padding: 30px; }
.food-results-scroll { min-width: 0; }
.food-results-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line-soft); padding-bottom: 20px; }
.food-results-head .eyebrow { margin-bottom: 7px; }
.food-results-head h2 { margin: 0; font-size: 20px; font-weight: 650; }
.food-results-head > div > p:last-child { margin: 7px 0 0; color: #75859a; font-size: 11px; }
.food-random-result { margin-top: 20px; border: 1px solid #2d609e; border-radius: 7px; background: linear-gradient(135deg, rgba(37, 104, 204, 0.2), rgba(17, 44, 78, 0.2)); padding: 18px 20px; }
.food-random-kicker { display: flex; align-items: center; gap: 7px; color: #70acff; font-size: 10px; font-weight: 750; }
.food-random-kicker svg { width: 13px; }
.food-random-result > div { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 11px; }
.food-random-result h3 { margin: 0; font-size: 20px; font-weight: 650; }
.food-random-result p { margin: 7px 0 0; color: #91a2b8; font-size: 11px; }
.food-random-result a, .food-place-side a { display: inline-flex; align-items: center; gap: 4px; color: #79aff7; font-size: 11px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.food-random-result a:hover, .food-place-side a:hover { color: #b7d6ff; }
.food-random-result a svg, .food-place-side a svg { width: 12px; }
.food-empty-state { display: grid; min-height: 450px; place-content: center; justify-items: center; padding: 40px; text-align: center; }
.food-empty-state > span { display: grid; width: 64px; height: 64px; place-items: center; border: 1px solid #263a55; border-radius: 50%; background: #0b1420; color: #6e9ddb; }
.food-empty-state svg { width: 24px; }
.food-empty-state h2 { margin: 18px 0 0; font-size: 16px; font-weight: 650; }
.food-empty-state p { margin: 8px 0 0; color: #718198; font-size: 12px; }
.food-result-list { display: grid; margin-top: 4px; }
.food-place-item { display: grid; min-width: 0; grid-template-columns: 88px 30px minmax(0, 1fr) 86px; align-items: stretch; gap: 12px; border-bottom: 1px solid var(--line-soft); padding: 18px 2px; }
.food-place-image { --food-icon: #78a1d4; position: relative; display: grid; width: 88px; min-height: 78px; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--food-icon) 30%, #182333); border-radius: 6px; background: color-mix(in srgb, var(--food-icon) 12%, #0d151f); }
.food-place-image img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.food-place-image > span { display: grid; justify-items: center; gap: 7px; color: var(--food-icon); }
.food-place-image > span svg { width: 20px; height: 20px; }
.food-place-image > span small { color: inherit; font-size: 9px; opacity: 0.78; }
.food-place-image[data-food-visual="hot-pot"] { --food-icon: #ff736d; }
.food-place-image[data-food-visual="barbecue"] { --food-icon: #f38f5e; }
.food-place-image[data-food-visual="seafood"] { --food-icon: #4fc3d8; }
.food-place-image[data-food-visual="vegetarian"],
.food-place-image[data-food-visual="salad"] { --food-icon: #62c58b; }
.food-place-image[data-food-visual="bakery"] { --food-icon: #d9a15c; }
.food-place-image[data-food-visual="dessert"] { --food-icon: #e58ab3; }
.food-place-image[data-food-visual="pizza"] { --food-icon: #e4aa4f; }
.food-place-image[data-food-visual="burger"],
.food-place-image[data-food-visual="fast-food"] { --food-icon: #dfb94f; }
.food-place-image[data-food-visual="noodle"] { --food-icon: #e19458; }
.food-place-image[data-food-visual="chicken"] { --food-icon: #e07b63; }
.food-place-image[data-food-visual="beef"] { --food-icon: #c98976; }
.food-place-image[data-food-visual="coffee"] { --food-icon: #67aedd; }
.food-place-image[data-food-visual="food-court"] { --food-icon: #8f9fe5; }
.food-place-image[data-food-visual="asian"] { --food-icon: #62a7e5; }
.food-place-rank { padding-top: 3px; color: #4d76aa; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 700; }
.food-place-main { min-width: 0; }
.food-place-title { display: flex; min-width: 0; align-items: center; gap: 9px; }
.food-place-title h3 { overflow: hidden; margin: 0; font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.food-place-title > span { flex: 0 0 auto; border: 1px solid #284568; border-radius: 4px; padding: 3px 6px; color: #7babeb; font-size: 9px; }
.food-place-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.food-place-tags em { border-radius: 3px; background: #121c29; padding: 3px 6px; color: #8294aa; font-size: 9px; font-style: normal; }
.food-place-main > p { margin: 9px 0 0; color: #738399; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.food-place-side { display: flex; align-items: flex-end; flex-direction: column; justify-content: space-between; gap: 12px; }
.food-place-side strong { color: #a6c7ed; font-size: 12px; font-weight: 650; }
.food-results-panel[aria-busy="true"] .food-results-head svg { animation: food-spin 900ms linear infinite; }
@keyframes food-spin { to { transform: rotate(360deg); } }

@media (min-width: 681px) {
  #foodView { display: flex; height: 100vh; flex-direction: column; overflow: hidden; padding-bottom: 24px; }
  #foodView[hidden] { display: none; }
  #foodView > .view-header, #foodView > .source-note { flex: 0 0 auto; }
  #foodView > .food-workspace { min-height: 0; flex: 1 1 auto; }
  .food-control-panel { min-height: 0; overflow-y: auto; }
  .food-results-panel { display: grid; min-height: 0; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
  .food-results-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 8px; scrollbar-gutter: stable; }
  .food-empty-state { min-height: 100%; }
}

[data-theme="light"] .calendar-workspace,
[data-theme="light"] .fortune-workspace,
[data-theme="light"] .food-workspace { background: rgba(255, 255, 255, 0.96); box-shadow: 0 22px 60px rgba(54, 74, 102, 0.1); }
[data-theme="light"] .calendar-detail,
[data-theme="light"] .fortune-input-panel,
[data-theme="light"] .food-control-panel { background: #f7f9fc; }
[data-theme="light"] .calendar-day:hover { border-color: #cbd9ea; background: #f4f7fb; }
[data-theme="light"] .calendar-day small { color: #697990; }
[data-theme="light"] .calendar-day small.is-special { color: #176bcf; }
[data-theme="light"] .calendar-day.is-outside { color: #8995a6; }
[data-theme="light"] .calendar-day.is-selected { border-color: #70a4e8; background: #e9f3ff; }
[data-theme="light"] .calendar-day.is-selected > span { color: #145cae; }
[data-theme="light"] .calendar-festival { border-color: #bfd7f4; background: #edf6ff; color: #1b66bb; }
[data-theme="light"] .calendar-facts dd { color: #34445a; }
[data-theme="light"] .calendar-advice p { color: #56677d; }
[data-theme="light"] .fortune-score-ring { background: radial-gradient(circle at center, #fff 58%, transparent 59%), conic-gradient(#2b7fe7 var(--score), #dce5ef 0); }
[data-theme="light"] .fortune-metrics > div > div { background: #dde6f0; }
[data-theme="light"] .fortune-lucky > div { background: #f7f9fc; }
[data-theme="light"] .fortune-insights article { background: #f8fafc; }
[data-theme="light"] .fortune-insights span { color: #2569bc; }
[data-theme="light"] .fortune-insights p { color: #596a7f; }
[data-theme="light"] .fortune-result blockquote { color: #4d5e74; }
[data-theme="light"] .fortune-basis em { border-color: #d1dce9; background: #f5f8fc; color: #52647a; }
[data-theme="light"] .food-location-icon { border-color: #bdd3ed; background: #eaf4ff; color: #176dcc; }
[data-theme="light"] .food-place-form > label,
[data-theme="light"] .food-filter-grid label > span { color: #45566d; }
[data-theme="light"] .food-random-result { border-color: #a9c9ee; background: linear-gradient(135deg, #edf6ff, #f7fbff); }
[data-theme="light"] .food-random-result p,
[data-theme="light"] .food-status { color: #5e7087; }
[data-theme="light"] .food-status.is-error { color: #bd3347; }
[data-theme="light"] .food-empty-state > span { border-color: #cad9ea; background: #f1f7fd; color: #3475c4; }
[data-theme="light"] .food-place-title > span { border-color: #bfd3eb; color: #2865aa; }
[data-theme="light"] .food-place-image { border-color: color-mix(in srgb, var(--food-icon) 28%, #dbe3ec); background: color-mix(in srgb, var(--food-icon) 9%, #fff); }
[data-theme="light"] .food-place-tags em { background: #eef3f8; color: #586b82; }
[data-theme="light"] .food-place-main > p { color: #607187; }
[data-theme="light"] .food-place-side strong { color: #315f96; }
[data-theme="light"] .food-random-result a,
[data-theme="light"] .food-place-side a { color: #176bcf; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: flex; min-height: 46px; align-items: center; gap: 9px; border: 1px solid #285646; border-radius: 6px; background: #0d1c18; padding: 0 15px; color: #a6e8d0; font-size: 13px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: 180ms ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast svg { width: 15px; color: var(--success); }

@media (max-width: 900px) {
  :root { --sidebar: 218px; }
  .tool-view { width: min(100% - 40px, 920px); padding-top: 45px; }
  .home-today { grid-template-columns: 1fr 1fr; }
  .home-almanac { border-right: 0; }
  .home-progress-list { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-soft); }
  .workspace-grid { grid-template-columns: 1fr; }
  .settings-panel { border-top: 1px solid var(--line); border-left: 0; }
  .settings-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .settings-panel .panel-title, .settings-panel > .primary-button, .settings-panel .panel-note { grid-column: 1 / -1; }
  .timestamp-converter-grid { grid-template-columns: 1fr; }
  .timestamp-panel { min-height: 0; }
  .timestamp-live { grid-template-columns: 48px minmax(0, 1fr); }
  .timestamp-live-unix { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); padding-top: 13px; }
  .calendar-workspace { grid-template-columns: 1fr; }
  .calendar-detail { border-top: 1px solid var(--line); border-left: 0; }
  .fortune-workspace { grid-template-columns: 280px minmax(0, 1fr); }
  .food-workspace { grid-template-columns: 290px minmax(0, 1fr); }
}

@media (max-width: 680px) {
  #cursorTrail, .sidebar { display: none; }
  .app-shell { padding-top: 61px; }
  .mobile-bar { position: fixed; inset: 0 0 auto; z-index: 30; display: flex; height: 61px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); background: rgba(7, 9, 13, 0.95); padding: 0 16px; backdrop-filter: blur(16px); }
  .mobile-bar .brand-mark { width: 29px; height: 29px; }
  .mobile-bar .brand-copy strong { font-size: 15px; }
  .mobile-actions .icon-button { width: 44px; height: 44px; flex-basis: 44px; }
  .sidebar.is-mobile-open { position: fixed; inset: 61px 0 0; z-index: 25; display: flex; width: 100%; border: 0; padding-top: 24px; }
  .sidebar.is-mobile-open > .brand { display: none; }
  .sidebar.is-mobile-open .tool-nav { margin-top: 0; }
  .main-content { margin-left: 0; }
  .tool-view { width: min(100% - 28px, 620px); padding: 34px 0 62px; }
  .site-footer { width: calc(100% - 28px); flex-wrap: wrap; margin-top: -34px; padding-bottom: 22px; }
  .home-header { margin-bottom: 22px; }
  .home-today { grid-template-columns: 1fr; }
  .home-date-primary { padding: 22px 18px; }
  .home-date-primary > strong { font-size: 34px; }
  .home-almanac { border: 0; border-top: 1px solid var(--line-soft); }
  .home-almanac > div { padding: 14px 18px; }
  .home-progress-list { grid-column: auto; grid-template-columns: 1fr; padding: 20px 18px; }
  .home-tool-groups { gap: 34px; margin-top: 36px; }
  .home-tool-grid { grid-template-columns: 1fr; }
  .home-tool-entry { min-height: 78px; }
  .view-header { align-items: flex-start; margin-bottom: 25px; }
  .view-header h1 { font-size: 30px; }
  .view-header > div > p:last-child { font-size: 14px; }
  .privacy-badge { display: none; }
  .upload-panel { min-height: 400px; padding: 14px; }
  .drop-zone { min-height: 370px; padding: 28px 15px; }
  .settings-panel { display: block; padding: 22px; }
  .dimension-grid { grid-template-columns: 1fr 1fr; }
  .result-panel { padding: 20px 14px; }
  .result-panel-head { align-items: flex-start; }
  .result-panel-head .secondary-button { padding: 0 10px; }
  .compressed-item { grid-template-columns: 44px minmax(0, 1fr) 36px; }
  .thumbnail-button { width: 44px; height: 44px; }
  .compressed-item .saving { grid-column: 2; text-align: left; }
  .queue-head { align-items: flex-start; flex-direction: column; }
  .queue-actions { width: 100%; justify-content: stretch; }
  .queue-actions .compact-button { flex: 1 1 120px; }
  .queue-actions .text-button { flex: 0 0 auto; }
  .continue-drop-zone { justify-content: flex-start; }
  .format-step { grid-template-columns: 42px minmax(0, 1fr); }
  .format-step-index { padding-top: 28px; }
  .format-step-body { padding: 24px 16px; }
  .format-step-heading, .format-output-heading { align-items: stretch; flex-direction: column; }
  .external-tool-button { width: 100%; }
  .drop-zone.format-drop-zone { min-height: 92px; align-items: stretch; flex-direction: column; }
  .format-drop-zone .secondary-button { width: 100%; }
  .format-actions { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .format-actions .primary-button { grid-column: 1 / -1; }
  .format-actions .text-button, .format-actions .secondary-button { min-width: 0; padding-right: 8px; padding-left: 8px; }
  .format-rule-strip { align-items: flex-start; flex-direction: column; gap: 9px; }
  .format-rule-strip > svg { transform: rotate(90deg); }
  .nine-patch-inline { height: 680px; min-height: 500px; max-height: 900px; margin-right: -6px; margin-left: -6px; }
  .nine-patch-inline-head { padding-left: 12px; }
  .nine-patch-inline-head p { display: none; }
  .form-section { grid-template-columns: 42px minmax(0, 1fr); }
  .section-body { padding: 24px 18px; }
  .field-grid { grid-template-columns: 1fr; }
  .form-action-bar { align-items: stretch; flex-direction: column; padding: 18px; }
  .form-action-bar .primary-button { width: 100%; }
  .link-results { padding: 24px 18px; }
  .link-result-item { grid-template-columns: 1fr; gap: 12px; }
  .timestamp-live { grid-template-columns: 42px minmax(0, 1fr); padding: 18px; }
  .timestamp-live-icon { width: 42px; height: 42px; }
  .timestamp-live-unix { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); padding-top: 14px; }
  .timestamp-live strong { font-size: 17px; }
  .timestamp-panel { padding: 22px 18px; }
  .timestamp-actions { align-items: stretch; flex-direction: column; }
  .timestamp-actions .primary-button, .timestamp-actions .secondary-button { width: 100%; }
  .utility-toolbar { padding: 14px; }
  .utility-action-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .utility-action-group > span { width: auto; grid-column: 1 / -1; }
  .utility-action-group .secondary-button { width: 100%; min-width: 0; padding: 0 7px; }
  .utility-replace-bar { grid-template-columns: 1fr; padding: 14px; }
  .utility-replace-bar .secondary-button { width: 100%; }
  .utility-editor-grid, .utility-editor-grid.compact { min-height: 0; grid-template-columns: 1fr; }
  .utility-editor-panel { min-height: 340px; }
  .utility-editor-panel + .utility-editor-panel { border-top: 1px solid var(--line); border-left: 0; }
  .utility-tabs { padding: 9px 10px; }
  .utility-tabs button { padding: 0 11px; }
  .utility-inline-actions { align-items: stretch; padding: 12px 14px; }
  .utility-inline-actions .primary-button, .utility-inline-actions .secondary-button { flex: 1; }
  .utility-inline-actions .utility-check { width: 100%; margin-left: 0; }
  .utility-form-panel { min-height: 0; padding: 20px 14px; }
  .utility-wide-field textarea { min-height: 220px; }
  .utility-form-row, .color-input-row { align-items: stretch; flex-direction: column; }
  .utility-form-row > label:first-child { width: 100%; flex-basis: auto; }
  .color-opacity-field { width: 100%; flex-basis: auto; }
  .conversion-result-item { grid-template-columns: minmax(90px, 0.65fr) minmax(0, 1fr) 38px; gap: 8px; padding-left: 11px; }
  .color-history-item { grid-template-columns: 40px minmax(0, 1fr) 18px; gap: 9px; padding: 8px 10px; }
  .color-history-time { display: none; }
  .generator-settings { align-items: stretch; flex-direction: column; }
  .generator-settings label:first-child { width: 100%; }
  .json-workspace { overflow: visible; }
  .json-mobile-tabs { position: sticky; top: 61px; z-index: 7; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); background: #0b1017; padding: 8px 12px; }
  .json-mobile-tabs button { min-height: 40px; border: 0; border-radius: 5px; background: transparent; color: #8797ad; font-weight: 700; }
  .json-mobile-tabs button.is-active { background: #16243a; color: #9fc8ff; box-shadow: inset 0 0 0 1px #2b568b; }
  .json-toolbar { position: sticky; top: 117px; z-index: 6; align-items: stretch; flex-wrap: wrap; padding: 12px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24); }
  .json-primary-actions { display: grid; width: 100%; grid-template-columns: repeat(3, 1fr); }
  .json-primary-actions :is(.primary-button, .secondary-button) { min-width: 0; padding: 0 8px; }
  .json-indent-control { margin-left: 0; }
  .json-toolbar > .text-button { margin-left: auto; }
  .json-editor-grid { grid-template-columns: 1fr; min-height: 0; }
  .json-editor-panel { min-height: min(58svh, 520px); }
  .json-editor-panel[hidden] { display: none; }
  .json-editor-panel + .json-editor-panel { border-top: 1px solid var(--line); border-left: 0; }
  #translationView { min-height: calc(100svh - 61px); padding-bottom: 18px; }
  .translation-embed-shell { min-height: 620px; grid-template-rows: auto minmax(0, 1fr) auto; }
  .translation-embed-head { align-items: flex-start; flex-direction: column; padding: 16px; }
  .translation-tabs { width: 100%; }
  .translation-tab { min-width: 0; flex: 1; gap: 4px; padding: 7px 2px; }
  .translation-tab::after { bottom: -17px; }
  .translation-tab strong { font-size: 12px; white-space: nowrap; }
  .translation-tab small { display: none; }
  .translation-provider-mark { width: 28px; height: 28px; flex-basis: 28px; }
  .translation-provider-mark :is(img, svg) { width: 17px; height: 17px; }
  .google-translation-panel { padding: 12px; }
  .google-translation-panel form { height: auto; min-height: 100%; grid-template-rows: auto auto auto; }
  .google-translation-toolbar { grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr); }
  .google-translation-toolbar .primary-button { grid-column: 1 / -1; width: 100%; }
  .google-translation-columns { grid-template-columns: 1fr; }
  .google-translation-pane textarea { min-height: 130px; }
  .translation-embed-actions { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) 40px; }
  .translation-embed-actions > .secondary-button:last-child { grid-column: 1 / -1; width: 100%; }
  .translation-state-label { justify-self: start; }
  .translation-embed-shell > footer { align-items: flex-start; padding: 12px 14px; }
  .calendar-panel { padding: 18px 10px; }
  .calendar-toolbar { gap: 8px; padding: 0 4px; }
  .calendar-toolbar strong { font-size: 17px; }
  .calendar-toolbar .secondary-button { min-height: 36px; padding: 0 11px; }
  .calendar-day { min-height: 61px; gap: 4px; padding: 6px 2px; }
  .calendar-day > span { font-size: 13px; }
  .calendar-day small { font-size: 9px; }
  .calendar-detail { padding: 24px 20px; }
  .fortune-workspace { grid-template-columns: 1fr; }
  .fortune-input-panel { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 20px; }
  .fortune-date { margin-bottom: 24px; }
  .fortune-disclaimer { margin-top: 24px; }
  .fortune-result { min-height: 0; padding: 26px 20px; }
  .fortune-overall { grid-template-columns: 108px minmax(0, 1fr); gap: 18px; }
  .fortune-score-ring { width: 106px; height: 106px; }
  .fortune-score-ring strong { font-size: 30px; }
  .fortune-overall h2 { font-size: 18px; }
  .fortune-metrics { grid-template-columns: 1fr; }
  .fortune-lucky { grid-template-columns: 1fr; }
  .fortune-insights { grid-template-columns: 1fr; }
  .fortune-basis { display: grid; gap: 9px; }
  .food-workspace { min-height: 0; grid-template-columns: 1fr; }
  .food-control-panel { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 20px; }
  .food-privacy { margin-top: 24px; }
  .food-results-panel { padding: 24px 18px; }
  .food-results-head { align-items: flex-start; }
  .food-random-result > div { align-items: flex-start; flex-direction: column; }
  .food-empty-state { min-height: 330px; padding: 30px 12px; }
  .food-place-item { grid-template-columns: 76px 24px minmax(0, 1fr); gap: 9px; }
  .food-place-image { width: 76px; min-height: 72px; }
  .food-place-side { grid-column: 3; align-items: center; flex-direction: row; }
  .toast { right: 14px; bottom: 14px; left: 14px; justify-content: center; }
  .image-preview-shell { grid-template-rows: 60px minmax(0, 1fr) 68px; }
  .image-preview-head { padding: 0 14px; }
  .image-preview-stage { padding: 18px 12px 82px; }
  .image-preview-nav { top: auto; bottom: 17px; width: 44px; height: 44px; transform: none; }
  .image-preview-prev { left: calc(50% - 54px); }
  .image-preview-next { right: calc(50% - 54px); }
  .image-preview-foot { justify-content: center; padding: 0 14px; }
  .image-preview-foot > div { display: none; }
  .image-preview-foot > span { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  #cursorTrail { display: none; }
}

@media (min-width: 901px) and (min-height: 720px) {
  .tool-view { padding-top: 42px; padding-bottom: 64px; }
  #jsonView { display: flex; min-height: 100svh; flex-direction: column; padding-top: 38px; padding-bottom: 38px; }
  #jsonView[hidden] { display: none; }
  #jsonView .view-header { flex: 0 0 auto; margin-bottom: 24px; }
  #jsonView .json-workspace { display: grid; min-height: 470px; flex: 1 1 auto; grid-template-rows: auto minmax(0, 1fr) auto; }
  #jsonView .json-editor-grid { min-height: 0; }
}

[data-theme="light"] .json-mobile-tabs { background: #f7f9fc; }
[data-theme="light"] .json-mobile-tabs button { color: #667990; }
[data-theme="light"] .json-mobile-tabs button.is-active { background: #e8f2fe; color: #185da8; box-shadow: inset 0 0 0 1px #a8c9ee; }

/* Dense interfaces remain readable without adding unnecessary vertical space. */
.brand-copy small,
.nav-label,
.sidebar-foot,
.eyebrow,
.setting-hint,
.range-labels,
.dimension-grid label,
.panel-note,
.conversion-spec dt,
.format-drop-copy small,
.format-rule-strip small,
.nine-patch-inline-head p,
.queue-meta span,
.compressed-meta span,
.compressed-meta small,
.continue-drop-zone small,
.image-preview-head p,
.field small,
.field-optional,
.recognition-state,
.link-result-meta p,
.timestamp-live span,
.timestamp-results span,
.json-editor-head small,
.translation-tab small,
.translation-state-label,
.google-translation-toolbar label > span,
.google-translation-pane > span,
.google-translation-pane > div > span,
.google-translation-status,
.translation-embed-shell > footer,
.calendar-toolbar span,
.calendar-weekdays,
.calendar-day small,
.calendar-facts dt,
.calendar-advice p,
.advice-label,
.source-note,
.fortune-date span,
.fortune-score-ring span,
.fortune-form-status,
.fortune-disclaimer,
.fortune-metrics span,
.fortune-lucky span,
.fortune-insights span,
.fortune-basis > span,
.fortune-basis em,
.food-location-state small,
.food-separator,
.food-status,
.food-privacy,
.food-results-head > div > p:last-child,
.food-random-kicker,
.food-random-result p,
.food-random-result a,
.food-place-side a,
.food-place-image > span small,
.food-place-rank,
.food-place-title > span,
.food-place-tags em,
.food-place-main > p { font-size: var(--text-meta); }
