:root {
  color-scheme: light;
  --paper: #f6f5f0; --surface: #fffefa; --ink: #1d2925; --muted: #58645f;
  --line: #dedfd6; --accent: #165747; --pale: #e1eee6; --warn: #8c4831;
  font: 16px/1.55 "Instrument Sans","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); min-height: 100dvh; }
button,input,textarea,select { font: inherit; }
button,a,input,select,textarea { -webkit-tap-highlight-color: transparent; }
button,a { touch-action: manipulation; }
a { color: var(--accent); }
button { border: 0; border-radius: 11px; cursor: pointer; min-height: 44px; padding: 9px 15px; }
button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mast { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  max-width: 880px; padding: 13px 22px; margin: auto; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 11px; align-items: center; text-decoration: none; color: var(--ink); font-weight: 720; letter-spacing: .045em; }
.brand small { display: block; font-size: 11px; font-weight: 500; letter-spacing: .15em; color: var(--muted); }
.brand-icon { background: var(--accent); color: white; width: 37px; height: 37px; display: grid; place-items: center; border-radius: 12px; }
.profile,.secondary { background: #eeefe7; color: var(--ink); }
main { max-width: 880px; margin: auto; padding: 24px 22px 0; }
.site-registration { text-align: center; font-size: 12px; padding: 24px 15px calc(90px + env(safe-area-inset-bottom)); }
.site-registration a { color: inherit; }
h1,h2,h3,p { overflow-wrap: anywhere; }
h1 { margin: 0 0 16px; font-size: clamp(26px, 5vw, 38px); letter-spacing: -.035em; line-height: 1.22; }
h2 { font-size: 17px; margin: 0 0 9px; }
h3 { font-size: 15px; margin: 0; }
p { margin: 0 0 12px; }
.muted,.meta { color: var(--muted); font-size: 13px; }
.hero { border-radius: 20px; padding: 18px; background: #173d34; color: #fff; margin-bottom: 20px; }
.hero textarea { background: #fdfdf6; border: 0; margin-top: 2px; }
.hero .secondary { background: #2e554b; color: #fff; }
.hero .primary { background: #d7edaa; color: #173d34; }
.primary { display: inline-flex; align-items: center; justify-content: center; border-radius: 11px;
  background: var(--accent); color: #fff; font-weight: 690; text-decoration: none; padding: 9px 17px; min-height: 44px; }
.hero .main-action { margin-left: auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: 15px; margin: 0 0 13px; }
.card + .section-title { margin-top: 23px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 19px 0 8px; }
.section-title h2 { margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grow { flex: 1 1 150px; }
.item { width: 100%; text-align: left; display: block; background: transparent; color: var(--ink);
  border-radius: 0; border-bottom: 1px solid var(--line); padding: 10px 0; }
.item:last-child { border-bottom: 0; }
.item strong { display: block; font-weight: 670; overflow-wrap: anywhere; }
.item .meta { margin: 3px 0 0; }
.item:hover { color: var(--accent); }
.tag { display: inline-block; font-size: 12px; color: var(--accent); background: var(--pale);
  padding: 2px 8px; border-radius: 20px; margin: 0 7px 5px 0; }
.warning { color: var(--warn); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
textarea,input:not([type=checkbox]),select { width: 100%; min-height: 44px; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); }
textarea { resize: vertical; min-height: 95px; }
label.field { display: grid; gap: 5px; font-weight: 620; font-size: 14px; margin: 10px 0; }
form .primary { margin-top: 8px; }
form .row .primary { margin-top: 0; }
nav { position: fixed; z-index: 2; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 880px);
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; background: var(--surface);
  padding: 7px 8px calc(9px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-radius: 18px 18px 0 0; }
nav button { display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: 12px; background: transparent; padding: 5px; }
nav button span { font-size: 20px; line-height: 1; }
nav button[aria-current] { background: var(--pale); color: var(--accent); font-weight: 720; }
dialog { width: min(520px,calc(100vw - 28px)); max-height: calc(100dvh - 35px); border-radius: 20px; border: 1px solid var(--line);
  padding: 20px; color: var(--ink); background: var(--surface); }
dialog::backdrop { background: #17292385; }
#close { margin-top: 14px; }
#toast { position: fixed; z-index: 4; left: 50%; bottom: 85px; transform: translateX(-50%);
  color: white; background: #173d34; padding: 11px 15px; border-radius: 10px; width: max-content; max-width: calc(100vw - 30px); }
.login { max-width: 460px; margin: 12dvh auto 0; padding: 30px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
@media (min-width: 650px) { .columns { display: grid; grid-template-columns: 1.15fr 1fr; gap: 13px; } }
@media (max-width: 420px) { main,.mast { padding-left: 15px; padding-right: 15px; } .hero { padding: 15px; } }

