/* Hyshota × AOZORA 工作台 · 基础样式与通用组件 */

/* ---------- Tokens ---------- */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #fbfcff;
  --surface-dim: #f1f4fa;
  --glass: rgba(252, 253, 255, 0.78);

  --ink: #1f2a3d;
  --ink-2: #46536b;
  --muted: #6f7c91;
  --faint: #96a2b8;

  --line: rgba(30, 45, 70, 0.09);
  --line-strong: rgba(30, 45, 70, 0.16);

  --hyshota: #2563eb;
  --hyshota-sky: #60a5fa;
  --hyshota-gold: #f59e0b;
  --hyshota-soft: #eff6ff;
  --primary: #2563eb;
  --primary-deep: #1e40af;
  --primary-soft: #eef4ff;
  --primary-tint: #dbe8ff;
  --coral: #d97856;
  --coral-soft: #fbede7;
  --gold: #e0a52c;
  --sky: #6f9fb2;

  --shadow-xs: 0 1px 2px rgba(25, 40, 70, 0.05);
  --shadow-sm: 0 1px 2px rgba(25, 40, 70, 0.04), 0 14px 32px -24px rgba(26, 48, 92, 0.28);
  --shadow-md: 0 2px 4px rgba(25, 40, 70, 0.04), 0 28px 56px -36px rgba(25, 50, 100, 0.32);
  --shadow-lg: 0 32px 90px -40px rgba(20, 45, 90, 0.45);

  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;

  --font-sans: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --sidebar-w: 236px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(1000px 560px at 8% -10%, rgba(191, 214, 250, 0.5), transparent 64%),
    radial-gradient(900px 560px at 98% 0%, rgba(248, 231, 194, 0.5), transparent 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(37, 99, 235, 0.18);
}

:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.4);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(30, 45, 70, 0.16);
  border-radius: 99px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- Layout ---------- */
.app-shell {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: 1580px;
  margin: 0 auto;
  padding: 16px;
}

.sidebar {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  height: calc(100vh - 32px);
  padding: 22px 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(252, 253, 250, 0.58)),
    var(--glass);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
  z-index: 30;
}

.content {
  flex: 1;
  min-width: 0;
  padding: 8px 18px 24px 38px;
}

.view-root {
  max-width: 1220px;
  margin: 0 auto;
}

.page-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1220px;
  margin: 44px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

/* ---------- Brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 6px 0;
  color: var(--primary);
  border-radius: 12px;
}

.brand-mark {
  flex: none;
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 8px 16px rgba(37, 99, 235, 0.24));
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-mark--app {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 8px 18px -10px rgba(37, 99, 235, 0.7);
}

.brand-mark--app::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(12, 35, 90, 0.08);
  pointer-events: none;
}

.brand-mark--app img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink);
  min-width: 0;
}

.brand-text strong {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
}

.brand-text strong i {
  font-style: normal;
  color: var(--hyshota);
  font-weight: 500;
  padding: 0 1px;
}

.brand-text em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--faint);
  text-transform: uppercase;
}

.brand-text em::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--hyshota-gold);
  vertical-align: 1px;
}

/* ---------- Sidebar nav ---------- */
.nav-block {
  margin-top: 34px;
}

.nav-label {
  padding-left: 13px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--faint);
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 13px;
  color: var(--muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-2);
}

.nav-item.is-active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.13), rgba(37, 99, 235, 0.05));
  color: var(--primary-deep);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08), 0 6px 16px -14px rgba(37, 99, 235, 0.4);
}

.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 16px;
  border-radius: 99px;
  background: var(--primary);
  transform: translateY(-50%);
}

.nav-icon {
  display: grid;
  place-items: center;
  color: currentColor;
}

.nav-icon svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.92;
}

.nav-text {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nav-en {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--faint);
  opacity: 0.8;
}

.nav-item.is-active .nav-en {
  color: var(--primary);
  opacity: 0.65;
}

.nav-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--coral);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(252, 253, 250, 0.9);
}

.sidebar-spacer {
  flex: 1;
  min-height: 20px;
}

.sidebar-tag {
  margin: 0 8px 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.sidebar-foot {
  margin-top: auto;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  text-align: left;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.user-card-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.user-card-wrap .user-card {
  flex: 1;
  min-width: 0;
}

.user-logout {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  transition: background 0.18s, color 0.18s;
}

.user-logout:hover {
  background: var(--coral-soft);
  color: #a64f37;
}

.user-logout svg {
  width: 14px;
  height: 14px;
}

.mobile-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.user-card:hover {
  background: #fff;
  border-color: var(--line-strong);
}

.user-card .user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.user-card .user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-card .user-handle {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.user-card .user-action {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: none;
  border-radius: 99px;
  background: transparent;
  color: var(--faint);
  transition: background 0.2s, color 0.2s;
}

.user-card .user-action:hover {
  background: var(--coral-soft);
  color: #a64f37;
}

.user-card .user-action svg {
  width: 15px;
  height: 15px;
}

.user-card--guest {
  border-style: dashed;
  background: transparent;
}

.user-card--guest:hover {
  background: rgba(255, 255, 255, 0.7);
}

.user-card--guest .user-name {
  color: var(--ink-2);
}

/* ---------- Avatar ---------- */
.avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background:
    radial-gradient(120% 120% at 20% 10%, rgba(255, 255, 255, 0.34), transparent 46%),
    linear-gradient(135deg, var(--av1, #2456c7), var(--av2, #93b4f3));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 4px 10px -6px rgba(20, 50, 92, 0.5);
  overflow: hidden;
}

.avatar-fallback {
  position: relative;
  z-index: 1;
}

.avatar > img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.avatar--lg {
  width: 64px;
  height: 64px;
  font-size: 23px;
}

.avatar--sm {
  width: 26px;
  height: 26px;
  font-size: 10.5px;
}

.avatar--xl {
  width: 76px;
  height: 76px;
  font-size: 27px;
}

/* ---------- Typography helpers ---------- */
.kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.kicker::before {
  content: "";
  width: 14px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.faint {
  color: var(--faint);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-hidden {
  display: none !important;
}

/* ---------- Page header ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin: 8px 0 28px;
}

.page-head-main {
  min-width: 0;
}

.page-title {
  margin-top: 12px;
  font-size: clamp(28px, 3.1vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--ink);
}

.page-sub {
  margin-top: 10px;
  max-width: 620px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 3px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 34px 0 16px;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-title .count {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.section-note {
  font-size: 11.5px;
  color: var(--faint);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease),
    transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--primary);
  color: #f8faf6;
  box-shadow: 0 9px 20px -14px rgba(37, 99, 235, 0.8);
}

.btn-primary:hover {
  background: var(--primary-deep);
  box-shadow: 0 12px 24px -12px rgba(30, 64, 175, 0.55);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: #fff;
  border-color: var(--line-strong);
}

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary-deep);
}

.btn-soft:hover {
  background: var(--primary-tint);
}

.btn-danger {
  background: #fbece7;
  color: #a64f37;
}

.btn-danger:hover {
  background: #f7ded5;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 10px;
  gap: 6px;
}

.btn-sm .icon {
  width: 14px;
  height: 14px;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-color: var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-2);
}

.btn-icon:hover {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-icon .icon {
  width: 16px;
  height: 16px;
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Chips / tags / pills ---------- */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border: 1px solid rgba(37, 99, 235, 0.07);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.055);
  color: #4d685e;
  font-size: 10.5px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.tag .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--tag-color, var(--primary));
}

.tag--neutral {
  background: var(--surface-dim);
  border-color: transparent;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 21px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pill--published {
  background: var(--primary-soft);
  color: var(--primary-deep);
}

.pill--offline {
  background: var(--surface-dim);
  color: var(--muted);
}

.pill--today {
  background: var(--primary);
  color: #fff;
}

.pill--coral {
  background: var(--coral-soft);
  color: #a85138;
}

.pill--gold {
  background: #faf2e1;
  color: #8b6b28;
}

.pill--sky {
  background: #edf4f6;
  color: #4e7c8c;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: var(--surface-dim);
  color: var(--muted);
}

.type-badge::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.type-badge--daily {
  background: rgba(37, 99, 235, 0.09);
  color: #25695c;
}

.type-badge--event {
  background: var(--coral-soft);
  color: #b25a40;
}

.type-badge--custom {
  background: #eef1f7;
  color: #5c6c86;
}

.type-badge--live {
  background: var(--coral-soft);
  color: #b25a40;
}

.type-badge--version {
  background: var(--primary-soft);
  color: var(--primary-deep);
}

.type-badge--reward {
  background: #faf2e1;
  color: #8b6b28;
}

.type-badge--community {
  background: #edf4f6;
  color: #4e7c8c;
}

/* ---------- Surfaces ---------- */
.panel {
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.panel-flat {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field > label,
.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

.field .optional {
  font-weight: 400;
  color: var(--faint);
  letter-spacing: 0;
}

.input,
.select,
.textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 0 13px;
  height: 42px;
  font-size: 13.5px;
  color: var(--ink);
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  appearance: none;
}

.select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236d7871' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

.textarea {
  height: auto;
  min-height: 92px;
  padding: 11px 13px;
  line-height: 1.65;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09);
}

.input::placeholder,
.textarea::placeholder {
  color: #a6afa9;
}

.hint {
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--faint);
}

.form-error {
  display: none;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fbeee9;
  color: #a64f37;
  font-size: 11.5px;
  line-height: 1.55;
}

.form-error.is-visible {
  display: block;
}

.segmented {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-dim);
}

.segmented button {
  flex: 1;
  height: 33px;
  padding: 0 8px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.segmented button:hover {
  color: var(--ink-2);
}

.segmented button.is-active {
  background: #fff;
  color: var(--primary-deep);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(20, 45, 37, 0.1);
}

.day-toggles {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.day-toggle,
.month-toggle {
  display: grid;
  place-items: center;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11.5px;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}

.day-toggle.is-active,
.month-toggle.is-active {
  border-color: rgba(37, 99, 235, 0.35);
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 600;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
}

.month-toggle {
  height: 28px;
  border-radius: 7px;
  font-size: 10.5px;
  font-family: var(--font-mono);
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11.5px;
  transition: all 0.16s var(--ease);
}

.choice.is-active {
  border-color: rgba(37, 99, 235, 0.32);
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 600;
}

/* ---------- Checkbox ---------- */
.task-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: transparent;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.task-check svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}

.task-check:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

.task-check.is-checked {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ---------- Progress ---------- */
.bar {
  height: 6px;
  border-radius: 99px;
  background: var(--surface-dim);
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #5a9c8c);
  transition: width 0.45s var(--ease);
}

/* ---------- Empty / loading ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 44px 24px;
  text-align: center;
}

.empty-art {
  width: 92px;
  height: 72px;
  color: var(--primary);
  opacity: 0.6;
}

.empty-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.empty-sub {
  max-width: 340px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--faint);
}

.empty .btn {
  margin-top: 4px;
}

.skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg, #edf1fa 25%, #f8fafd 38%, #edf1fa 55%);
  background-size: 300% 100%;
  animation: shimmer 1.5s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(17, 29, 24, 0.36);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade-in 0.22s var(--ease);
}

.modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: min(88vh, 920px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background: #fdfefb;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.3s var(--ease);
  overflow: hidden;
}

.modal--wide {
  width: min(660px, 100%);
}

.modal--narrow {
  width: min(430px, 100%);
}

.modal-head {
  position: relative;
  padding: 26px 28px 14px;
  flex: none;
}

.modal-kicker {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--faint);
  text-transform: uppercase;
  margin-bottom: 9px;
}

.modal-title {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  padding-right: 36px;
}

.modal-sub {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: background 0.18s, color 0.18s;
}

.modal-close:hover {
  background: var(--surface-dim);
  color: var(--ink);
}

.modal-close svg {
  width: 15px;
  height: 15px;
}

.modal-body {
  padding: 8px 28px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-body--flush {
  padding: 0 28px 26px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 16px 28px 22px;
  border-top: 1px solid var(--line);
  background: rgba(250, 251, 247, 0.7);
  flex: none;
}

.modal-foot .spacer {
  flex: 1;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------- Toast ---------- */
.toast-root {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 110;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 17px;
  border-radius: 999px;
  background: #1d2722;
  color: #f6f8f4;
  font-size: 12px;
  letter-spacing: 0.01em;
  box-shadow: 0 16px 36px -18px rgba(12, 28, 22, 0.7);
  animation: toast-in 0.28s var(--ease);
}

.toast .icon {
  width: 14px;
  height: 14px;
  color: #9fd3bd;
}

.toast--error {
  background: #5c2a1e;
}

.toast--error .icon {
  color: #f0b8a2;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- Decorative ---------- */
.hairline {
  height: 1px;
  background: var(--line);
}

/* ---------- Mobile bar ---------- */
.mobile-bar {
  display: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

