:root {
  color-scheme: light;
  --canvas: #f7fbfd;
  --paper: #fff;
  --ink: #34475c;
  --muted: #556779;
  --line: #e3ecf0;
  --accent: #126994;
  --action: #bfeaff;
  --on-action: #12496a;
  --wash: #eaf7fe;
  --tint: #fbfdfe;
  font: 100%/1.5 Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: var(--accent); text-underline-offset: .17em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.55rem, 4vw, 2rem); line-height: 1.18; letter-spacing: -.04em; }
h2 { font-size: 1.14rem; line-height: 1.35; letter-spacing: -.025em; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip:focus { position: absolute; z-index: 2; padding: .7rem 1rem; background: white; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-bar, .site-nav, .workspace { width: min(100%, 69rem); margin-inline: auto; padding-inline: clamp(1rem, 3.7vw, 2.4rem); }
.site-bar { display: flex; min-height: 4.6rem; gap: .75rem; align-items: center; padding-block: .8rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-size: 1.6rem; font-weight: 700; letter-spacing: -.045em; line-height: 1.2; white-space: nowrap; }
.brand-mark { display: grid; flex: none; width: 1.7rem; height: 1.7rem; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; transform: rotate(-5deg); }
.brand-mark i { border-radius: 3px; background: #38bdf8; }
.brand-mark i:nth-child(2) { background: #30b8cf; }
.brand-mark i:nth-child(3) { background: #14a6bf; }
.brand-mark i:nth-child(4) { background: #34d399; }
.search-box { display: flex; align-items: center; gap: .65rem; width: min(17rem, 32%); margin-left: auto; padding-inline: .78rem; border: 1px solid var(--line); border-radius: 7px; background: var(--tint); }
.search-box:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-box input { flex: 1; min-width: 0; width: 100%; min-height: 44px; background: transparent; border: 0; outline: 0; padding: 0; }
::placeholder { color: var(--muted); opacity: 1; }
.search-mark { position: relative; border: 1.5px solid var(--muted); border-radius: 50%; width: .8rem; height: .8rem; margin-right: 2px; }
.search-mark::after { content: ""; position: absolute; width: .36rem; height: 1.5px; background: var(--muted); transform: rotate(45deg); right: -.25rem; bottom: -.1rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 44px; border: 1px solid transparent; border-radius: 7px; padding: .5rem .95rem; font-size: .9rem; line-height: 1.35; font-weight: 600; text-decoration: none; }
.button.primary { background: var(--action); color: var(--on-action); }
.button.primary:hover { background: #a9e1fc; }
.button.secondary { color: var(--on-action); border-color: #cfdfe7; background: var(--paper); }
.button.secondary:hover, .button.subtle:hover { background: var(--wash); }
.button.subtle { background: transparent; color: var(--accent); }
.button.danger { color: #812f31; background: #fbe6e5; }
.site-nav { display: flex; gap: clamp(1.1rem, 3vw, 2rem); }
.site-nav a { display: inline-flex; align-items: center; min-height: 46px; border-bottom: 3px solid transparent; color: var(--muted); font-size: .93rem; font-weight: 600; text-decoration: none; }
.site-nav a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
.workspace { padding-block: clamp(1.2rem, 3.2vw, 2rem); }
.workspace:focus { outline: none; }
.shelf-layout { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(14rem, 1fr); gap: clamp(.85rem, 2.4vw, 1.5rem); align-items: start; }
.panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: clamp(1.1rem, 2.7vw, 1.75rem); box-shadow: 0 2px 6px #38749508; }
.intro, .state { color: var(--muted); }
.intro { margin-top: .4rem; }
.state { margin-top: 1rem; }
.section-bar, .dialog-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-bar .button { flex: none; }
.empty-shelf { display: grid; justify-items: center; text-align: center; padding: clamp(1.8rem, 4vw, 3rem) .5rem 1rem; }
.empty-shelf h2 { margin-top: .8rem; }
.empty-shelf p { max-width: 32ch; margin: .35rem 0 1rem; color: var(--muted); }
.shelf-picture { display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 0 5px 2px; height: 31px; width: 43px; border-bottom: 2px solid #7297a6; }
.shelf-picture i { height: 24px; width: 7px; background: #d0ebf5; border: 1.5px solid #72a3ba; border-radius: 2px; }
.shelf-picture i:nth-child(2) { height: 20px; background: #d4f0e7; border-color: #74a895; }
.shelf-picture i:nth-child(3) { height: 26px; transform: rotate(-12deg); }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 5.25rem), 6rem)); gap: .75rem .5rem; margin-top: 1.2rem; }
.app-item { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.app-launch { display: flex; flex-direction: column; align-items: center; gap: .5rem; width: 100%; min-height: 44px; padding: .25rem .1rem; color: var(--ink); text-decoration: none; text-align: center; font-size: .9rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; border-radius: 8px; }
.app-mark { flex: none; width: 64px; height: 64px; border-radius: 15px; overflow: hidden; display: grid; place-items: center; color: var(--on-action); background: var(--wash); box-shadow: 0 1px 3px #25364e16; font-size: 1.45rem; font-weight: 650; letter-spacing: -.04em; }
.app-mark img { width: 100%; height: 100%; object-fit: contain; }
.app-launch:hover .app-mark { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-action, .text-action { min-width: 44px; min-height: 44px; padding: .25rem .4rem; font-size: .875rem; color: var(--muted); border: 0; border-radius: 5px; background: transparent; }
.app-action:hover, .text-action:hover { color: var(--accent); text-decoration: underline; }
.app-action[aria-pressed="true"], .text-action { color: var(--accent); }
.personal-section { margin-top: 1.65rem; }
.personal-section + .personal-section { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.story { padding-block: .8rem; border-bottom: 1px solid var(--line); display: grid; gap: .2rem; overflow-wrap: anywhere; }
.story time { color: var(--muted); font-size: .875rem; }
.story a { display: inline-flex; align-items: center; min-height: 44px; width: fit-content; font-weight: 600; }
.news-panel .story a { color: var(--ink); }
.inline-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; font-weight: 600; }
footer { margin-top: 1rem; text-align: right; }
footer a { color: var(--muted); font-size: .875rem; display: inline-flex; align-items: center; min-height: 44px; }
.feedback:not(:empty), .storage-warning:not([hidden]) { margin-top: 1rem; color: var(--on-action); background: var(--wash); padding: .65rem .85rem; border-radius: 6px; overflow-wrap: anywhere; }
dialog { width: min(30rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: clamp(1rem, 3vw, 1.65rem); box-shadow: 0 12px 50px #243b5126; }
dialog::backdrop { background: #24394c42; }
dialog h2 { font-size: 1.35rem; }
.field { display: grid; gap: .25rem; margin-top: .85rem; font-size: .93rem; font-weight: 600; }
.field input, .field textarea { width: 100%; min-height: 44px; font-weight: 400; font-size: 1rem; background: white; border: 1px solid #a9bac5; border-radius: 6px; padding: .5rem .7rem; }
.field textarea { resize: vertical; }
.dialog-actions { justify-content: flex-end; align-items: center; margin-top: 1.2rem; gap: .55rem; }
.form-error:not(:empty) { margin-top: .8rem; color: #923c3a; }
.link-actions { display: grid; gap: .5rem; margin-top: 1.2rem; }
.personal-note { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .5rem; color: var(--muted); }
@media (max-width: 43rem) {
  .shelf-layout { grid-template-columns: 1fr; }
}
@media (max-width: 32rem) {
  .site-bar { flex-wrap: wrap; gap: .6rem; }
  .search-box { order: 1; width: 100%; }
  .site-bar > button { margin-left: auto; }
}
