:root {
  --bg: #F4F2EC;
  --surface: #FFFFFF;
  --surface-2: #ECE8DF;
  --text: #1C1B18;
  --muted: #706B61;
  --faint: #9E978B;
  --line: rgba(28, 27, 24, .09);
  --line-strong: rgba(28, 27, 24, .16);
  --accent: #A34D2C;
  --accent-soft: #F2E2D7;
  --hero: linear-gradient(135deg, #25221D 0%, #443A2E 100%);
  --hero-text: #F8F3E9;
  --hero-muted: rgba(248, 243, 233, .62);
  --skeleton: #E7E1D5;
  --radius: 20px;
  --shadow: 0 14px 34px -26px rgba(37, 29, 19, .42);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #E8E5DE;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; }
svg { display: block; flex-shrink: 0; }

.app-shell {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(90% 42% at 92% 0%, #FCFAF5 0%, rgba(252, 250, 245, 0) 66%),
    var(--bg);
  padding:
    max(16px, env(safe-area-inset-top))
    20px
    max(16px, env(safe-area-inset-bottom));
}

.view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  flex-shrink: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  min-width: 0;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: block;
  box-shadow: 0 1px 2px rgba(28, 27, 24, .06);
}

.brand-name {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.03em;
  line-height: 1;
}

.brand-sub {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  color: var(--faint);
  letter-spacing: .05em;
  line-height: 1;
  padding-top: 2px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .18s ease, transform .15s ease;
}

.icon-btn:hover { background: #FBF9F4; }
.icon-btn:active { transform: scale(.96); }
.icon-btn .icon { width: 20px; height: 20px; }
.icon-btn.ghost { background: transparent; }

.subpage .page-title {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.topbar-spacer { width: 44px; height: 44px; }

.text-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 10px 4px;
  cursor: pointer;
  min-height: 44px;
}

.page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 18px;
}

.intro {
  padding: 18px 2px 0;
  flex-shrink: 0;
}

.date {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .02em;
}

.greeting {
  margin: 0;
  font-size: clamp(26px, 7.2vw, 32px);
  font-weight: 640;
  letter-spacing: -.05em;
  line-height: 1.14;
}

.greeting span { color: var(--muted); font-weight: 420; }
.home-sub {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.home-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 17px;
  padding-top: 23px;
}

.featured {
  position: relative;
  text-decoration: none;
  width: 100%;
  min-height: 196px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px;
  text-align: left;
  border: 0;
  border-radius: 25px;
  background: var(--hero);
  color: var(--hero-text);
  box-shadow: 0 22px 44px -30px rgba(31, 23, 14, .65);
  cursor: pointer;
  isolation: isolate;
  transition: transform .16s ease;
}

.featured:active { transform: scale(.995); }
.featured::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
  right: -64px;
  top: -72px;
  z-index: -1;
}
.featured::after {
  content: "";
  position: absolute;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .045);
  right: 9px;
  bottom: -62px;
  z-index: -1;
}

.featured-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.featured-icon {
  width: 47px;
  height: 47px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .13);
  color: var(--hero-text);
  display: grid;
  place-items: center;
}
.featured-icon .icon { width: 23px; height: 23px; }

.featured-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  display: grid;
  place-items: center;
  color: var(--hero-text);
}
.featured-arrow .icon { width: 14px; height: 14px; }

.featured-watermark {
  position: absolute;
  right: 16px;
  bottom: 18px;
  width: 84px;
  height: 84px;
  color: var(--hero-text);
  opacity: .1;
  z-index: 1;
  pointer-events: none;
}
.featured-watermark .icon { width: 100%; height: 100%; stroke-width: 1.2; }

.featured-copy {
  margin-top: auto;
  position: relative;
  z-index: 2;
  padding-top: 32px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hero-muted);
}
.eyebrow::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--hero-text);
  opacity: .65;
}

.featured h2 {
  margin: 8px 0 4px;
  font-size: 27px;
  line-height: 1.08;
  letter-spacing: -.045em;
  font-weight: 630;
}
.featured-meta {
  margin: 0;
  font-size: 12px;
  color: var(--hero-muted);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.featured-access {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  margin-left: 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .13);
  color: var(--hero-text);
  font-size: 9px;
  vertical-align: 1px;
}
.featured-access .icon { width: 10px; height: 10px; }

.other-sites { flex-shrink: 0; }

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}
.section-row h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.section-count {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  color: var(--faint);
  letter-spacing: .04em;
}

.site-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.site-row {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, transform .14s ease;
}
.site-row:hover { background: #FFFEFB; }
.site-row:active { transform: scale(.995); }

.site-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--tone-bg, var(--surface-2));
  color: var(--tone-fg, var(--text));
}
.site-icon .icon { width: 19px; height: 19px; }

.tone-1 { --tone-bg: #F1DED2; --tone-fg: #984928; }
.tone-2 { --tone-bg: #E4E8DC; --tone-fg: #51633F; }
.tone-3 { --tone-bg: #DCE7EC; --tone-fg: #336578; }
.tone-4 { --tone-bg: #EFE6D1; --tone-fg: #7A632E; }
.tone-5 { --tone-bg: #E8E0EE; --tone-fg: #69487A; }

.site-copy {
  flex: 1;
  min-width: 0;
}
.site-copy b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 580;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.site-copy span {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-row > .icon { width: 15px; height: 15px; color: var(--faint); flex-shrink: 0; }

.access-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  background: #F4E1D5;
  color: #8C3F24;
  font-size: 9.5px;
  font-weight: 600;
  font-style: normal;
  letter-spacing: .01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.access-pill .icon { width: 10px; height: 10px; }

.home-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 15px 3px 1px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
}
.home-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-foot .icon { width: 12px; height: 12px; }

/* About */
.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 2px 22px;
}
.brand-block img {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  box-shadow: 0 8px 18px -12px rgba(30, 23, 16, .35);
}
.brand-block h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 640;
  letter-spacing: -.045em;
  line-height: 1.1;
}
.brand-block p {
  margin: 5px 0 0;
  color: var(--faint);
  font-size: 10.5px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  overflow: hidden;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
}
.info-row:last-child { border-bottom: 0; }
.info-row .site-icon {
  width: 29px;
  height: 29px;
  border-radius: 8px;
}
.info-row .site-icon .icon { width: 14px; height: 14px; }
.info-row b {
  flex: 1;
  font-size: 12.5px;
  font-weight: 500;
}
.info-row small {
  color: var(--faint);
  font-size: 10.5px;
  text-align: right;
}

.primary-btn {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 560;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: opacity .16s ease, transform .14s ease;
}
.primary-btn:hover { opacity: .9; }
.primary-btn:active { transform: scale(.995); }
.primary-btn[disabled] { opacity: .55; cursor: default; }
.primary-btn .icon { width: 15px; height: 15px; }

.outline-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.outline-btn .icon { width: 15px; height: 15px; }

.section-label {
  margin: 23px 2px 9px;
  color: var(--faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.list-link {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  cursor: pointer;
}
.list-link .site-icon {
  width: 29px;
  height: 29px;
  border-radius: 8px;
}
.list-link .site-icon .icon { width: 14px; height: 14px; }
.list-link .list-title {
  flex: 1;
  font-size: 12.5px;
  font-weight: 500;
}
.list-link small {
  color: var(--faint);
  font-size: 10px;
}
.list-link > .icon { width: 13px; height: 13px; color: var(--faint); }

.about-footer {
  margin-top: auto;
  padding: 24px 2px 2px;
  text-align: center;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.65;
}
.refresh-note {
  margin: 10px 2px 0;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

/* Unlock */
.unlock-page {
  align-items: center;
  text-align: center;
  padding: 28px 0 8px;
}
.unlock-icon {
  width: 62px;
  height: 62px;
  border-radius: 19px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin: 20px 0 22px;
}
.unlock-icon .icon { width: 26px; height: 26px; }
.unlock-page h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 630;
  letter-spacing: -.04em;
}
.unlock-page > p {
  margin: 9px 0 0;
  max-width: 300px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.unlock-form {
  width: 100%;
  max-width: 330px;
  margin-top: 28px;
  text-align: left;
}
.field-label {
  display: block;
  margin: 0 2px 6px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.field-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-wrap .icon { width: 16px; height: 16px; color: var(--muted); }
.field-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  letter-spacing: .1em;
}
.field-wrap input::placeholder {
  color: var(--faint);
  letter-spacing: 0;
  font-size: 13px;
}
.form-error {
  min-height: 20px;
  margin: 7px 2px 0;
  color: #B44432;
  font-size: 10.5px;
  line-height: 1.5;
}
.security-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  width: 100%;
  max-width: 330px;
  margin-top: 17px;
  padding: 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
  text-align: left;
}
.security-note .icon { width: 13px; height: 13px; color: var(--accent); margin-top: 1px; }
.link-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  padding: 12px;
}

/* Admin */
.admin-content { padding-top: 8px; padding-bottom: 10px; }
.session-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 18px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
}
.session-pill .icon { width: 12px; height: 12px; color: var(--accent); }

.featured-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.featured-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.featured-option .site-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}
.featured-option .site-icon .icon { width: 14px; height: 14px; }
.featured-option .option-name {
  min-width: 0;
  flex: 1;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.featured-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.featured-option .radio-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
}
.featured-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.featured-option:has(input:checked) .radio-dot {
  border: 4px solid var(--accent);
}
.featured-empty {
  padding: 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--faint);
  font-size: 10.5px;
  text-align: center;
}

.editor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.editor-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}
.editor-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}
.editor-head .site-icon {
  width: 33px;
  height: 33px;
  border-radius: 10px;
}
.editor-head .site-icon .icon { width: 15px; height: 15px; }
.editor-title {
  flex: 1;
  min-width: 0;
}
.editor-title b {
  display: block;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor-title span {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.editor-actions {
  display: flex;
  gap: 1px;
  flex-shrink: 0;
}
.mini-btn {
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.mini-btn:hover { background: var(--surface-2); }
.mini-btn:disabled { opacity: .3; cursor: default; }
.mini-btn .icon { width: 14px; height: 14px; }
.mini-btn.up .icon { transform: rotate(-90deg); }
.mini-btn.down .icon { transform: rotate(90deg); }
.mini-btn.danger { color: #A4503C; }

.editor-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.field.wide { grid-column: 1 / -1; }
.field span {
  color: var(--faint);
  font-size: 9px;
  letter-spacing: .04em;
}
.field input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #FCFAF7;
  padding: 8px 10px;
  font-size: 13px;
  outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.icon-picker {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 1px 5px;
  scrollbar-width: none;
}
.icon-picker::-webkit-scrollbar { display: none; }
.field .icon-choice {
  width: 48px;
  min-width: 48px;
  height: 59px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FCFAF7;
  color: var(--muted);
  cursor: pointer;
}
.field .icon-choice .site-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: none;
}
.field .icon-choice .site-icon .icon {
  width: 16px;
  height: 16px;
}
.field .icon-choice-label {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
}
.field .icon-choice.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.field .icon-choice.selected .site-icon {
  background: var(--surface);
  color: var(--accent);
}
.field .icon-choice.selected .icon-choice-label { color: var(--accent); }
.tone-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 2px 2px;
}
.tone-choice {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--tone-bg);
  padding: 0;
  cursor: pointer;
}
.tone-choice.selected {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line-strong);
}
.switch-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}
.switch-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.switch-copy b { font-size: 11px; font-weight: 500; }
.switch-copy span { font-size: 9px; color: var(--faint); }
.switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface-2);
  flex-shrink: 0;
  transition: background .16s ease;
}
.switch::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
  transition: transform .16s ease;
}
.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.switch-row:has(input:checked) .switch { background: var(--accent); }
.switch-row:has(input:checked) .switch::after {
  transform: translateX(16px);
  background: #FFF9F3;
}

.add-btn {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.add-btn .icon { width: 14px; height: 14px; }
.admin-error {
  min-height: 18px;
  margin: 8px 2px 0;
  color: #B44432;
  font-size: 10.5px;
  line-height: 1.5;
}
.admin-note {
  margin: 10px 2px 0;
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.65;
  text-align: center;
}
.admin-count {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  color: var(--faint);
}

/* Empty / error */
.state-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px 16px 38px;
}
.state-icon {
  width: 76px;
  height: 76px;
  border-radius: 23px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  color: var(--accent);
  margin-bottom: 20px;
}
.state-icon .icon { width: 30px; height: 30px; }
.state-screen h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -.035em;
}
.state-screen p {
  max-width: 290px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.state-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 260px;
  margin-top: 22px;
}
.state-note {
  margin-top: 16px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.6;
}

/* Loading */
.sk {
  position: relative;
  overflow: hidden;
  background: var(--skeleton);
  border-radius: 8px;
}
.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .34), transparent);
  animation: shimmer 1.25s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-date { width: 108px; height: 10px; margin-top: 23px; }
.sk-greeting { width: 184px; height: 31px; margin-top: 10px; border-radius: 9px; }
.sk-sub { width: 148px; height: 11px; margin-top: 10px; }
.sk-featured {
  width: 100%;
  height: 196px;
  margin-top: 23px;
  border-radius: 25px;
}
.sk-row {
  width: 100%;
  height: 68px;
  border-radius: 17px;
}
.sk-stack { display: flex; flex-direction: column; gap: 8px; margin-top: 17px; }
.sk-section { width: 76px; height: 11px; margin-top: 17px; }
.sk-foot { width: 144px; height: 9px; margin-top: auto; margin-bottom: 3px; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 24px);
  transform: translate(-50%, 10px);
  z-index: 50;
  max-width: calc(100vw - 48px);
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 380px) {
  .app-shell { padding-left: 16px; padding-right: 16px; }
  .brand-sub { display: none; }
  .featured { min-height: 185px; padding: 16px; }
  .featured h2 { font-size: 25px; }
  .editor-fields { grid-template-columns: 1fr; }
  .field.wide, .switch-row { grid-column: 1; }
  .featured-options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
