:root {
  color-scheme: light dark;
  --bg: #f5f3ef; --card: #fffefa; --text: #262d31; --muted: #60696e;
  --line: #deded7; --field: #eaeae4; --focus: #285e74; --shadow: 0 3px 12px #35403906;
  --work: #e7e7f3; --travel: #e1ece7; --home: #f3e7d7; --health: #f0e0e3; --ai: #dfe9f1;
  --work-ink: #53516d; --travel-ink: #3e6254; --home-ink: #735630; --health-ink: #7f4855; --ai-ink: #3f5f78;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at 95% 0, #e4e9df85, transparent 44%), radial-gradient(ellipse at 0 30%, #ede6dc80, transparent 45%), var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-text-size-adjust: 100%; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
a { color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
.shell { max-width: 1080px; margin: auto; padding: max(32px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
.header { padding: 8px 0 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 650; letter-spacing: .025em; margin-bottom: 42px; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 7px); gap: 3px; transform: rotate(-7deg); }
.brand-mark i { width: 7px; height: 7px; border-radius: 2px; background: #61796d; }
.brand-mark i:last-child { background: #ac956a; }
.date { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.date::first-letter { text-transform: uppercase; }
h1 { font-size: clamp(34px, 5.5vw, 52px); line-height: 1.12; letter-spacing: -.045em; font-weight: 700; margin: 0; }
.intro { margin: 14px 0 0; color: var(--muted); font-size: 16px; }
.search { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 17px; background: var(--field); min-height: 54px; padding: 0 15px; margin-bottom: 36px; }
.search:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.search svg { width: 21px; height: 21px; fill: none; stroke: var(--muted); stroke-width: 1.7; flex: none; }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); padding: 16px 0; font-size: 16px; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input::-webkit-search-cancel-button { display: none; }
.search button { color: var(--muted); background: transparent; border: 0; min-width: 44px; min-height: 44px; font-size: 28px; margin-right: -10px; }
h2 { margin: 0; font-size: 15px; font-weight: 650; }
.catalog-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.catalog-heading { margin-top: 4px; }
.catalog-heading > span, .section-heading > span { color: var(--muted); font-size: 12px; }
.group { margin: 0 0 28px; }
.group-title { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .045em; display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.group-title::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-ink); }
.group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
[data-group="0"] { --accent: var(--work); --accent-ink: var(--work-ink); }
[data-group="1"] { --accent: var(--travel); --accent-ink: var(--travel-ink); }
[data-group="2"] { --accent: var(--home); --accent-ink: var(--home-ink); }
[data-group="3"] { --accent: var(--health); --accent-ink: var(--health-ink); }
[data-group="4"] { --accent: var(--ai); --accent-ink: var(--ai-ink); }
.card { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; border: 1px solid var(--line); border-radius: 23px; background: var(--card); box-shadow: var(--shadow); padding: 20px; min-height: 190px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 17px; background: var(--accent); font-size: 27px; line-height: 1; margin-bottom: 20px; }
.card-title { font-size: 16px; line-height: 1.3; font-weight: 650; letter-spacing: -.025em; overflow-wrap: anywhere; }
.card-subtitle { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 7px; }
.external { position: absolute; top: 19px; right: 19px; color: var(--muted); font-size: 16px; }
.card-note { display: block; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; }
.card:active, .recent-card:active { transform: scale(.97); }
.recent-section { margin-bottom: 34px; }
.recent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.recent-card { position: relative; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--card); padding: 12px; border-radius: 17px; text-decoration: none; transition: transform .18s ease; }
.recent-card .icon { width: 38px; height: 38px; font-size: 22px; border-radius: 12px; margin: 0; }
.recent-card .card-title { font-size: 12px; line-height: 1.35; }
.recent-card .external { position: static; font-size: 12px; margin-left: auto; }
footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; padding: 22px 0 8px; margin-top: 40px; }
.message, .empty, .error { color: var(--muted); text-align: center; padding: 32px 8px; line-height: 1.6; }
.empty > span { font-size: 42px; }
.empty h2, .error h2 { color: var(--text); font-size: 19px; }
.empty button, .error button { min-height: 44px; border: 1px solid var(--line); border-radius: 13px; padding: 9px 16px; color: var(--text); background: var(--card); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 24px; z-index: 10; background: var(--card); padding: 14px; border-radius: 12px; }
.skip-link:focus { top: max(12px, env(safe-area-inset-top)); }
@media (hover: hover) { .card:hover { transform: translateY(-3px); border-color: var(--accent-ink); box-shadow: 0 8px 24px #1525210d; } .recent-card:hover { border-color: var(--accent-ink); } }
@media (max-width: 480px) {
  .shell { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  .brand { margin-bottom: 34px; }
  .card { padding: 16px; min-height: 185px; border-radius: 20px; }
  .card-title { font-size: 15px; }
  .card-subtitle { font-size: 12px; }
  .recent-card { flex-direction: column; align-items: flex-start; padding: 12px 10px; gap: 9px; }
  .recent-card .external { position: absolute; top: 10px; right: 10px; }
  .section-heading > span { display: none; }
}
@media (min-width: 700px) { .shell { padding-top: 48px; } .group-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .header { padding-bottom: 36px; } .search { max-width: 520px; } }
@media (min-width: 1000px) { .group-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (prefers-color-scheme: dark) {
  :root { --bg: #171c20; --card: #22282d; --text: #edf0eb; --muted: #adb6ba; --line: #363f44; --field: #252d31; --focus: #a6d4df; --shadow: 0 3px 12px #00000012;
    --work: #3c3c52; --travel: #2d4840; --home: #4e4231; --health: #4b343e; --ai: #304352;
    --work-ink: #b7b4d5; --travel-ink: #9fc2b1; --home-ink: #d3b68c; --health-ink: #d9a7b7; --ai-ink: #a6bfd3; }
  body { background: radial-gradient(ellipse at 95% 0, #2a3c354d, transparent 44%), radial-gradient(ellipse at 0 30%, #33313c40, transparent 45%), var(--bg); }
  .brand-mark i { background: #a0bcad; } .brand-mark i:last-child { background: #c4ad84; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } .card:hover, .card:active, .recent-card:active { transform: none; } }
