/* The editor's look, from the approved mockup (mockup/index.html) */

@font-face { font-family: Figtree; src: url(figtree.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: Fraunces; src: url(fraunces.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f6f4ef;
  --panel: #ffffff;
  --line: #e7e3da;
  --line-strong: #d6d0c3;
  --ink: #17191c;
  --soft: #5e636b;
  --faint: #8d929a;
  --accent: #2346d8;
  --accent-soft: #eef1fd;
  --good: #1d8a5b;
  --good-soft: #e7f5ee;
  --warn: #b25e09;
  --warn-soft: #fdf3e6;
  --bad: #b3261e;
  --bad-soft: #fdeceb;
  --side: #101419;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(20 20 30 / .05), 0 4px 16px rgb(20 20 30 / .05);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 Figtree, system-ui, sans-serif; color: var(--ink); background: var(--bg); }
button, input, textarea, select { font: inherit; color: inherit; }
svg { width: 1.15em; height: 1.15em; flex: none; }
a { color: inherit; }
code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: #efece5; padding: 1px 5px; border-radius: 5px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Layout */
.app { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.side { background: var(--side); color: #c9ced6; padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; }
.brand-mark { width: 42px; height: 42px; border-radius: 50%; background: #f4dd07; color: #111; display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 20px; height: 20px; }
.brand strong { display: block; color: #fff; font-size: 15px; line-height: 1.25; }
.brand span { font-size: 12.5px; color: #8e96a3; }
.side h6 { margin: 18px 10px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #6c7480; font-weight: 600; }
.nav-btn { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: none; text-align: left; cursor: pointer; color: inherit; text-decoration: none; transition: background .15s, color .15s; }
.nav-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-btn:hover { background: #1b2028; color: #fff; }
.nav-btn[aria-current="page"] { background: #232a35; color: #fff; }
.side-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 2px; }
.side-foot form { margin: 0; }

.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 32px; min-height: 58px; background: rgb(246 244 239 / .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.crumbs { font-size: 13.5px; color: var(--soft); display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs b { color: var(--ink); font-weight: 600; }
.crumbs svg { width: .9em; height: .9em; rotate: -90deg; color: var(--faint); }
.icon-btn { border: 0; background: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--soft); }
.icon-btn:hover { background: #efece5; color: var(--ink); }
.icon-btn.burger { display: none; }

.page { max-width: 880px; margin: 0 auto; padding: 36px 32px 120px; }
.page-head { margin-bottom: 26px; }
.page-head h1, .display { font-family: Fraunces, Georgia, serif; font-weight: 500; font-size: 34px; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 8px; }
.page-head p { margin: 0; color: var(--soft); max-width: 60ch; }
.page-head.with-action { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--panel); cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; transition: transform .15s var(--ease), background .15s, border-color .15s; text-decoration: none; }
.btn:hover { border-color: #bdb6a7; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #2b2f36; }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }
.btn.ghost { background: none; border-color: transparent; color: var(--soft); }
.btn.ghost:hover { background: #ece9e1; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { color: var(--bad); }
.btn.wide { width: 100%; height: 44px; }
.btn.busy { opacity: .6; pointer-events: none; }

/* Cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 18px; }
.card h2 { font-size: 16px; margin: 0 0 4px; }
.card .hint, p.hint { margin: 0 0 16px; color: var(--soft); font-size: 13.5px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.card-head > :nth-child(2) { margin-left: auto; }
.card-head form { margin: 0; }
.muted { color: var(--faint); }
.center { text-align: center; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.actions form { margin: 0; }

.notice { padding: 10px 14px; border-radius: 10px; background: var(--good-soft); color: #145c3d; font-size: 14px; margin: 0 0 16px; }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 99px; background: #efece5; color: var(--soft); }
.pill.on { background: var(--good-soft); color: var(--good); }
.problems { margin: 0 0 12px; padding-left: 18px; font-size: 13.5px; color: var(--soft); }
.problems li { margin: 3px 0; }
.warnings summary { cursor: pointer; font-size: 13.5px; color: var(--warn); margin-bottom: 8px; }
.plain { margin: 0; padding-left: 18px; }
.plain li { margin: 4px 0; }

/* Fields */
.stack { display: grid; gap: 14px; }
.stack .field { margin: 0; }
.field { display: grid; gap: 6px; margin: 0 0 16px; align-content: start; border: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 6px; }
.field small { color: var(--faint); font-size: 12.5px; }
.field small.error { color: var(--bad); }
.input { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fdfcfa; }
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check input { margin-top: 3px; accent-color: var(--accent); }
.check span, .toggle > span:last-child { display: grid; }
.check small, .toggle small { color: var(--faint); font-size: 12.5px; font-weight: 400; }

.toggle { display: flex; align-items: center; gap: 14px; cursor: pointer; margin: 4px 0 20px; position: relative; }
.toggle input { position: absolute; opacity: 0; }
.toggle .sw { width: 44px; height: 26px; border-radius: 99px; background: #d4cfc4; position: relative; transition: background .2s; flex: none; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .2); transition: translate .2s var(--ease); }
.toggle input:checked + .sw { background: var(--good); }
.toggle input:checked + .sw::after { translate: 18px 0; }
.toggle input:focus-visible + .sw { box-shadow: 0 0 0 4px var(--accent-soft); }

/* Lists and tables */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows li > div { flex: 1; min-width: 0; }
.rows li small { display: block; color: var(--faint); font-size: 12.5px; }
.rows li form { margin: 0; }
.rows a { text-decoration: none; }
.rows a:hover { text-decoration: underline; }
.row-icon { width: 34px; height: 34px; border-radius: 9px; background: #f1ede4; display: grid; place-items: center; color: var(--soft); flex: none; }
.events li { align-items: baseline; }
.events li small { white-space: nowrap; }

.table-card { padding: 6px 0; }
.table-card > summary { list-style: none; cursor: pointer; padding: 14px 24px; }
.table-card > summary::-webkit-details-marker { display: none; }
.table-card > summary h2 { display: inline; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; padding: 10px 24px; }
.table td { padding: 12px 24px; border-top: 1px solid var(--line); vertical-align: top; }
.table td small { display: block; color: var(--faint); font-size: 12.5px; }
.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table .num { text-align: right; }

.facts { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--faint); }
.facts dd { margin: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { display: grid; gap: 4px; padding: 18px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; transition: border-color .15s, transform .2s var(--ease); }
.tile:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.tile svg { width: 22px; height: 22px; color: var(--accent); margin-bottom: 6px; }
.tile b { font-size: 17px; }
.tile span { color: var(--soft); font-size: 13.5px; }

.link-card { border-color: #e2a20b; background: #fffdf5; }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Signed out */
.solo { min-height: 100vh; display: grid; place-content: center; padding: 32px 18px; gap: 18px; width: min(440px, 100%); margin: 0 auto; }
.solo-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; }
.solo-brand svg { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: #f4dd07; }
.solo-card { padding: 30px 30px 26px; margin: 0; }
.solo-card .lede { color: var(--soft); margin: 0 0 22px; }
.solo-card p { margin: 0 0 14px; }
.solo-foot { text-align: center; color: var(--faint); font-size: 13px; margin: 0; }
.solo-card .or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 20px 0 16px; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.big-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.big-icon svg { width: 28px; height: 28px; }

/* ---------- The editor (mockup: index.html) ---------- */

.brand a { font-size: 12.5px; color: #8e96a3; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand a:hover { color: #fff; }
.brand > div { min-width: 0; }
.nav-btn .count { margin-left: auto; font-size: 11.5px; background: #f4dd07; color: #111; border-radius: 99px; padding: 0 7px; font-weight: 700; }
.nav-btn .count.bad { background: #f87171; }
.nav-btn.back { color: #8e96a3; margin-bottom: 4px; }
.studio-note { font-size: 11.5px; color: #5d6570; padding: 10px 10px 0; }
.hide-sm { color: var(--soft); }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--soft); margin-left: auto; white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.status.dirty i { background: #e2a20b; box-shadow: 0 0 0 4px #fbecc4; }
.status.saving i { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
.status.problem i { background: var(--bad); }
@keyframes pulse { 50% { opacity: .3; } }
.top-actions { display: flex; gap: 8px; }
.btn .n { background: #f4dd07; color: #111; border-radius: 99px; font-size: 12px; padding: 0 7px; line-height: 20px; }
.page-head .where { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--accent); text-decoration: none; margin-top: 10px; font-weight: 600; }
.page-head .where svg { width: 1em; height: 1em; }

.textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; padding: 10px 12px; outline: none; min-height: 96px; resize: vertical; line-height: 1.55; transition: border-color .15s, box-shadow .15s; }
.textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field > .lbl { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.field > .lbl small { font-weight: 400; }
.field .revert { margin-left: auto; border: 0; background: none; color: var(--warn); font-size: 12px; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; cursor: pointer; padding: 0; }
.field .revert svg { width: 1em; height: 1em; }
.field .by { font-weight: 400; color: var(--warn); font-size: 12px; }
.field.is-changed .input, .field.is-changed .textarea, .field.is-changed .photo-pick, .field.is-changed .icon-pick { border-color: #e2a20b; background: #fffdf5; }
.field.is-changed .toggle .sw { box-shadow: 0 0 0 3px #fbecc4; }
.field.has-error .input, .field.has-error .textarea, .field.has-error .photo-pick { border-color: var(--bad); }
.field .err { color: var(--bad); font-size: 12.5px; }
.field .counter { text-align: right; font-size: 12px; color: var(--faint); margin-top: -2px; }
.field .counter.over { color: var(--bad); font-weight: 600; }
.input.mono { font: 13.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.row3 { display: grid; grid-template-columns: 1fr 150px; gap: 14px; }
.row > .field, .row3 > .field { margin-bottom: 16px; }
.money { position: relative; }
.money::before { content: "$"; position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--faint); }
.money .input { padding-left: 24px; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: 2px; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 10px 10px 0 0; padding: 4px; background: #faf9f6; }
.toolbar button { border: 0; background: none; width: 32px; height: 30px; border-radius: 7px; display: grid; place-items: center; cursor: pointer; color: var(--soft); }
.toolbar button:hover { background: #ece9e1; color: var(--ink); }
.toolbar + .textarea { border-radius: 0 0 10px 10px; }
.field > .toolbar { margin-bottom: -6px; }
.item.scalar { grid-template-columns: 1fr auto; align-items: center; padding: 10px 12px; }
.item.scalar .tools { padding: 0; }
.link-field { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 8px; }
.link-field.page-only { grid-template-columns: 1fr; }
select.input { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%238d929a' d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; padding-right: 32px; }
.toggle-field { margin-bottom: 18px; }
.toggle-field .toggle { margin: 0; }

.lock { display: flex; gap: 14px; align-items: flex-start; background: #f7f5ef; border-radius: 12px; padding: 14px 16px; color: var(--soft); font-size: 13.5px; margin-bottom: 16px; }
.lock svg { color: var(--faint); margin-top: 2px; }
.lock b { color: var(--ink); display: block; }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: #23336e; font-size: 13.5px; margin-bottom: 18px; align-items: center; }
.note svg { color: var(--accent); }
.note .btn { margin-left: auto; }

/* Lists */
.list { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fdfcfa; transition: border-color .15s, box-shadow .15s, opacity .15s; }
.item:hover { border-color: var(--line-strong); }
.item.is-new { border-color: #e2a20b; background: #fffdf5; }
.item.dragging { opacity: .4; }
.item.drop-before { box-shadow: 0 -3px 0 var(--accent); }
.item.drop-after { box-shadow: 0 3px 0 var(--accent); }
.item > div { min-width: 0; }
.grip { color: #b8b2a5; cursor: grab; padding-top: 9px; touch-action: none; }
.tools { display: flex; gap: 2px; padding-top: 2px; }
.tools .icon-btn { width: 30px; height: 30px; color: var(--faint); }
.tools .icon-btn[disabled] { opacity: .3; cursor: default; }
.add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; border: 1.5px dashed var(--line-strong); border-radius: 12px; background: none; color: var(--soft); font-weight: 600; cursor: pointer; margin-top: 10px; }
.add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.list-block { margin-bottom: 18px; }
.list-block > h2 { font-size: 16px; margin: 0 0 10px; }
.list-empty { color: var(--faint); font-size: 13.5px; margin: 4px 0; }
.badge { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: #fbecc4; color: #7a5300; margin-left: 6px; vertical-align: 2px; }
.badge.bad { background: var(--bad-soft); color: var(--bad); }

.group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.group.is-new { border-color: #e2a20b; }
.group > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 22px; cursor: pointer; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary h2 { font-size: 16px; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group > summary .meta { color: var(--faint); font-size: 13px; white-space: nowrap; }
.group > summary .tools { margin-left: auto; padding: 0; }
.group > summary .chev { color: var(--faint); transition: rotate .2s; display: grid; }
.group[open] > summary .chev { rotate: 180deg; }
.group .body { padding: 0 22px 22px; }

.sub { margin: 4px 0 16px; padding: 12px 14px; border-radius: 10px; background: #f7f5ef; }
.sub > b { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--soft); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.sub .field:last-child, .sub .row:last-child > .field { margin-bottom: 0; }

/* Cards that open to edit */
.card-item { display: block; }
.card-item .summary { display: grid; grid-template-columns: auto 92px 1fr auto; gap: 14px; align-items: center; }
.card-item .summary.no-thumb { grid-template-columns: auto 1fr auto; }
.card-item h3 { margin: 0; font-size: 15px; }
.card-item p { margin: 2px 0 0; font-size: 13px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-item .edit-body { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 14px; display: none; }
.card-item.open .edit-body { display: block; }
.card-item.open { border-color: var(--line-strong); box-shadow: var(--shadow); background: #fff; }
.card-item .right { display: flex; gap: 6px; align-items: center; }
.thumb { width: 92px; aspect-ratio: 4/3; border-radius: 9px; object-fit: cover; background: #e9e5dc; display: block; }

/* Photos */
.photo-field { display: grid; grid-template-columns: 168px 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.photo-pick { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; background: #e9e5dc; aspect-ratio: 4/3; }
.photo-pick img { width: 100%; height: 100%; object-fit: cover; display: block; transition: scale .4s var(--ease); }
.photo-pick .empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--soft); font-size: 13px; font-weight: 600; }
.photo-pick .hover { position: absolute; inset: auto 8px 8px; display: flex; justify-content: center; gap: 6px; padding: 6px; border-radius: 8px; background: rgb(255 255 255 / .92); font-size: 12.5px; font-weight: 600; opacity: 0; translate: 0 6px; transition: .2s var(--ease); }
.photo-pick:hover .hover, .photo-pick:focus-visible .hover { opacity: 1; translate: 0 0; }
.photo-pick:hover img { scale: 1.04; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.gallery button { margin: 0; padding: 0; text-align: left; border-radius: 12px; overflow: hidden; background: #fff; border: 2px solid transparent; outline: 1px solid var(--line); cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.gallery button:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.gallery button.current { border-color: var(--accent); }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #e9e5dc; }
.gallery span { display: block; padding: 6px 9px; font-size: 12px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Icons */
.icon-pick { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; cursor: pointer; }
.icon-pick svg { width: 22px; height: 22px; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 50vh; overflow: auto; margin-top: 12px; }
.icon-grid button { display: grid; justify-items: center; gap: 6px; padding: 12px 4px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-size: 11px; color: var(--soft); }
.icon-grid button:hover, .icon-grid button.current { border-color: var(--accent); color: var(--accent); }
.icon-grid svg { width: 24px; height: 24px; color: var(--ink); }

/* Overview */
.hello { display: grid; gap: 18px; margin-bottom: 18px; }
.live { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: linear-gradient(150deg, #012749, #00182f 70%); color: #dfe6ee; border: 0; }
.live .pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; background: rgb(255 255 255 / .1); padding: 4px 10px; border-radius: 99px; color: #fff; }
.live .pill i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgb(74 222 128 / .25); }
.live h2 { font-family: Fraunces, Georgia, serif; font-weight: 500; font-size: 22px; color: #fff; margin: 10px 0 2px; }
.live .sub-line { font-size: 13.5px; color: #9fb0c3; }
.live a { color: #f4dd07; font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.tasks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.task { display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-decoration: none; transition: border-color .15s, transform .15s var(--ease); min-width: 0; }
.task:hover { border-color: var(--accent); transform: translateY(-1px); }
.task .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.task b { display: block; font-size: 14px; }
.task small { color: var(--faint); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.timeline li:first-child { border-top: 0; }
.timeline time { color: var(--faint); font-size: 12.5px; width: 92px; flex: none; }
.timeline .who { margin-left: auto; color: var(--faint); font-size: 12.5px; white-space: nowrap; }

/* Modal, publish summary, toast */
.scrim { position: fixed; inset: 0; background: rgb(16 20 25 / .45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.modal { width: min(640px, 100%); max-height: 86vh; overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 30px 80px -20px rgb(0 0 0 / .4); padding: 28px; translate: 0 12px; transition: translate .25s var(--ease); }
.modal.wide { width: min(860px, 100%); }
.scrim.on .modal { translate: 0 0; }
.modal h2 { font-family: Fraunces, Georgia, serif; font-weight: 500; font-size: 26px; margin: 0 0 4px; }
.modal > p { color: var(--soft); margin: 0 0 18px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 22px; }
.modal .actions small { margin-right: auto; color: var(--faint); font-size: 12.5px; }
.diff { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.diff li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; overflow-wrap: anywhere; }
.diff .path { color: var(--faint); font-size: 12px; display: flex; gap: 8px; }
.diff .path span { margin-left: auto; }
.diff del { color: #a33; background: #fdeceb; text-decoration: line-through; padding: 0 3px; border-radius: 3px; }
.diff ins { color: #156b45; background: var(--good-soft); text-decoration: none; padding: 0 3px; border-radius: 3px; }
.diff .problem { border-color: #f5c2bf; background: var(--bad-soft); }
.diff .problem a { color: var(--bad); font-weight: 600; }
.toast { position: fixed; bottom: 22px; left: 50%; translate: -50% 20px; opacity: 0; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; display: flex; gap: 10px; align-items: center; z-index: 70; transition: .25s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; translate: -50% 0; }
.toast.bad { background: var(--bad); }
.fade { animation: fade .35s var(--ease); }
@keyframes fade { from { opacity: 0; translate: 0 6px; } }

@media (max-width: 1100px) { .tasks { grid-template-columns: repeat(2, 1fr); } }

/* Phone */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 50; translate: -100% 0; transition: translate .25s var(--ease); }
  .side.open { translate: 0 0; box-shadow: 0 0 0 100vmax rgb(0 0 0 / .35); }
  .icon-btn.burger { display: grid; }
  .top { padding: 10px 16px; }
  .page { padding: 24px 16px 96px; }
  .page-head h1, .display { font-size: 28px; }
  .page-head.with-action { flex-direction: column; }
  .row, .hello, .tasks, .photo-field, .link-field { grid-template-columns: 1fr; }
  .row3 { grid-template-columns: 1fr 120px; }
  .hide-sm, .status { display: none; }
  .top-actions { margin-left: auto; }
  .card-item .summary { grid-template-columns: 72px 1fr auto; }
  .card-item .summary.no-thumb { grid-template-columns: 1fr auto; }
  .card-item .summary .grip, .item > .grip { display: none; }
  .item { grid-template-columns: 1fr auto; }
  .thumb { width: 72px; }
  .card-item .right .btn .t { display: none; }
  .card-item .right .btn { padding: 0 9px; }
  .tools { flex-direction: column; }
  .group .body { padding: 0 16px 16px; }
  .group > summary { padding: 14px 16px; }
  .modal { padding: 22px 18px; }
  .table th:nth-child(n+3), .table td:nth-child(n+3) { display: none; }
  .table th, .table td { padding-left: 16px; padding-right: 16px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .card { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
