:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --text: #1f2933;
  --muted: #64748b;
  --panel: #ffffff;
  --line: #e2e8f0;
  --line-strong: #d9e2ec;
  --aside: #1f2933;
  --aside-text: #f8fafc;
  --aside-dim: #cbd5e1;
  --aside-who: #e2e8f0;
  --aside-hover: #334155;
  --accent: #0f766e;
  --danger: #be123c;
  --quiet: #e2e8f0;
  --quiet-text: #1f2933;
  --notice-bg: #ecfdf5;
  --notice-line: #99f6e4;
  --error-bg: #fff1f2;
  --error-text: #9f1239;
  --th: #f8fafc;
  --signout: #fecdd3;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12161c;
  --text: #e7ecf2;
  --muted: #a8b3c2;
  --panel: #1c232d;
  --line: #2c3644;
  --line-strong: #3a4658;
  --aside: #0e1319;
  --aside-text: #e7ecf2;
  --aside-dim: #a8b3c2;
  --aside-who: #cbd5e1;
  --aside-hover: #243041;
  --accent: #2dd4bf;
  --danger: #fb7185;
  --quiet: #2c3644;
  --quiet-text: #e7ecf2;
  --notice-bg: #052e2a;
  --notice-line: #115e59;
  --error-bg: #3f1219;
  --error-text: #fecdd3;
  --th: #222a35;
  --signout: #fecdd3;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; }
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
aside { background: var(--aside); color: var(--aside-text); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.brand { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 0.8rem; }
.brand span { width: 2.2rem; height: 2.2rem; border-radius: 0.6rem; background: var(--accent); color: #042f2e; display: grid; place-items: center; font-weight: 700; }
.brand small { display: block; color: var(--aside-dim); }
.who { margin: 0 0 0.6rem; color: var(--aside-who); font-size: 0.92rem; }
nav { display: flex; flex-direction: column; gap: 0.35rem; }
nav a, .signout, .button { text-decoration: none; padding: 0.45rem 0.7rem; border-radius: 0.5rem; }
nav a { color: var(--aside-who); }
nav a.active { background: var(--accent); color: #042f2e; font-weight: 600; }
nav a:hover:not(.active) { background: var(--aside-hover); }
.signout, .theme { margin-top: 0.4rem; color: var(--signout); background: transparent; text-align: left; padding: 0.45rem 0.7rem; }
.theme { margin-top: auto; color: var(--aside-who); }
main { padding: 1.25rem 1.5rem 3rem; }
.solo { max-width: 28rem; margin: 8vh auto; background: var(--panel); padding: 2rem; border-radius: 16px; }
h1 { font-size: 1.7rem; margin: 0 0 0.4rem; }
h2 { font-size: 1.05rem; margin: 1.2rem 0 0.4rem; }
p, li { line-height: 1.4; }
.notice { background: var(--notice-bg); border: 1px solid var(--notice-line); padding: 0.6rem 0.8rem; border-radius: 8px; }
.error { background: var(--error-bg); color: var(--error-text); padding: 0.6rem 0.8rem; border-radius: 8px; }
label { display: block; margin: 0.7rem 0 0.25rem; }
input, select, textarea { width: 100%; max-width: 36rem; font: inherit; color: var(--text); padding: 0.45rem 0.55rem; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel); }
textarea { min-height: 6rem; }
button, .button { font: inherit; font-weight: 600; background: var(--accent); color: #042f2e; border: 0; border-radius: 8px; padding: 0.5rem 0.9rem; cursor: pointer; }
button.danger { background: var(--danger); color: white; }
button.quiet, .button { background: var(--quiet); color: var(--quiet-text); }
button.theme { background: transparent; color: var(--aside-who); font-weight: 600; }
.solo .theme { color: var(--text); margin: 0 0 1rem; padding-left: 0; }
.dates, .row, .ask { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: end; }
.dates { margin-bottom: 1rem; }
.pager { display: inline-flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.views { display: flex; flex-direction: row; align-items: baseline; gap: 1.25rem; margin: 0.25rem 0 1rem; padding: 0; background: none; border: 0; }
.views a { flex: 0 0 auto; width: auto; text-decoration: none; padding: 0.1rem 0 0.2rem; border-radius: 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; font-size: 0.95rem; background: none; }
.views a.active { background: none; color: var(--accent); border-bottom-color: var(--accent); }
.views a:hover:not(.active) { color: var(--text); background: none; }
.actions { margin: 0 0 0.35rem; }
.dates label { margin: 0; }
.dates input { width: auto; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; background: var(--panel); width: 100%; }
th, td { border: 1px solid var(--line); padding: 0.35rem 0.45rem; vertical-align: top; font-size: 0.92rem; }
th { background: var(--th); text-align: left; }
td a { color: inherit; text-decoration: none; display: block; min-height: 1.2rem; }
.board { display: flex; gap: 0.7rem; overflow-x: auto; align-items: flex-start; }
.board section { min-width: 180px; background: var(--panel); border-radius: 12px; padding: 0.7rem; }
.block { display: block; margin: 0.35rem 0; padding: 0.45rem; border-radius: 8px; text-decoration: none; }
.ask { align-items: center; border-bottom: 1px solid var(--line); padding: 0.25rem 0; }
.ask form { margin: 0; }
.ask p { margin: 0; flex: 1; }
fieldset { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 0.8rem 1rem; margin: 0.8rem 0; }
@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  aside { position: sticky; top: 0; }
  nav { flex-direction: row; flex-wrap: wrap; }
}
