:root {
  color-scheme: light;
  --ink: #34423e;
  --ink-soft: #66736e;
  --muted: #8c9792;
  --paper: #fffefa;
  --paper-strong: #ffffff;
  --canvas: #f6f9f3;
  --mint: #91cdbb;
  --mint-deep: #4f9f89;
  --mint-pale: #e1f3eb;
  --lavender: #b9a9db;
  --lavender-pale: #eee8f8;
  --peach: #efb99f;
  --peach-pale: #fbe9df;
  --butter: #f2d88f;
  --butter-pale: #fff5d7;
  --rose: #d98c96;
  --line: #dfe8e1;
  --line-strong: #cbd9d0;
  --shadow: 0 14px 34px rgba(64, 88, 77, 0.09);
  --shadow-soft: 0 5px 16px rgba(64, 88, 77, 0.07);
  --radius-xl: 26px;
  --radius-lg: 19px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --sidebar-width: 238px;
  --content-gutter: clamp(18px, 2.2vw, 42px);
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 5%, rgba(239, 185, 159, 0.17), transparent 24rem),
    radial-gradient(circle at 92% 2%, rgba(185, 169, 219, 0.17), transparent 25rem),
    var(--canvas);
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(79, 159, 137, 0.28);
  outline-offset: 2px;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.soft { color: var(--ink-soft); }
.danger-text { color: #b35f68; }
.success-text { color: var(--mint-deep); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--ink-soft);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: white;
  background: linear-gradient(145deg, var(--mint), var(--lavender));
  box-shadow: 0 8px 20px rgba(105, 154, 139, 0.22), inset 0 1px 0 rgba(255,255,255,.6);
  font-size: 21px;
}

.brand-mark--large { width: 64px; height: 64px; border-radius: 22px; font-size: 30px; animation: breathe 1.5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-4px) rotate(5deg); } }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr);
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(36px, 6vw, 84px);
  background:
    linear-gradient(150deg, rgba(255,255,255,.78), rgba(242,249,242,.6)),
    radial-gradient(circle at 25% 20%, var(--butter-pale), transparent 45%),
    radial-gradient(circle at 80% 70%, var(--lavender-pale), transparent 48%);
  border-right: 1px solid rgba(203, 217, 208, .75);
}

.auth-story::before,
.auth-story::after {
  content: "";
  position: absolute;
  border-radius: 50% 50% 44% 56%;
  filter: blur(.2px);
  opacity: .75;
}

.auth-story::before { width: 280px; height: 280px; right: -100px; bottom: 80px; background: var(--mint-pale); transform: rotate(24deg); }
.auth-story::after { width: 170px; height: 170px; left: -50px; bottom: -35px; background: var(--peach-pale); }

.brand-lockup { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; font-weight: 800; font-size: 17px; letter-spacing: -.03em; }
.auth-copy { position: relative; z-index: 1; max-width: 580px; margin: auto 0; }
.auth-eyebrow { color: var(--mint-deep); font-weight: 800; letter-spacing: .02em; }
.auth-copy h1 { margin: 14px 0 18px; font-size: clamp(34px, 5vw, 62px); line-height: 1.14; letter-spacing: -.055em; font-weight: 850; }
.auth-copy h1 span { color: var(--mint-deep); }
.auth-copy p { max-width: 520px; color: var(--ink-soft); font-size: 17px; }
.feature-pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.feature-pill { padding: 8px 13px; border: 1px solid rgba(145,205,187,.55); border-radius: 999px; background: rgba(255,255,255,.62); color: #527166; font-size: 13px; font-weight: 700; }
.auth-footnote { position: relative; z-index: 1; color: var(--muted); font-size: 12px; }

.auth-panel { position: relative; display: grid; place-items: center; padding: 30px; }
.auth-card { width: min(440px, 100%); padding: clamp(28px, 5vw, 44px); border: 1px solid rgba(203,217,208,.82); border-radius: var(--radius-xl); background: rgba(255,254,250,.9); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.auth-card h2 { margin: 0; font-size: 27px; letter-spacing: -.04em; }
.auth-card > p { margin: 8px 0 28px; color: var(--ink-soft); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 0 0 24px; padding: 5px; border-radius: 14px; background: #edf2ed; }
.auth-tab { border: 0; border-radius: 10px; padding: 10px 12px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 750; }
.auth-tab.is-active { background: white; color: var(--ink); box-shadow: var(--shadow-soft); }

.field { display: grid; gap: 7px; margin: 0 0 15px; }
.field label, .field-label { color: var(--ink-soft); font-size: 13px; font-weight: 750; }
.field-hint { margin: -2px 0 0; color: var(--muted); font-size: 11px; }
.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255,255,255,.88);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input, .select { height: 44px; padding: 0 13px; }
.textarea { min-height: 110px; resize: vertical; padding: 12px 13px; }
.input:hover, .select:hover, .textarea:hover { border-color: #aebfb4; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--mint-deep); box-shadow: 0 0 0 3px rgba(145,205,187,.18); outline: none; background: white; }
.input--small, .select--small { height: 36px; padding: 0 10px; font-size: 13px; }
.input[type="color"] { padding: 5px; }
.input-group { display: flex; gap: 8px; }
.input-group > :first-child { flex: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.check-line { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.check-line input { accent-color: var(--mint-deep); width: 17px; height: 17px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--mint-deep);
  color: white;
  font-weight: 760;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 7px 15px rgba(79,159,137,.18); filter: saturate(1.04); }
.btn:active { transform: translateY(0); }
.btn:disabled { cursor: not-allowed; opacity: .48; transform: none; box-shadow: none; }
.btn--wide { width: 100%; }
.btn--soft { color: #46796b; background: var(--mint-pale); border-color: #cce7db; }
.btn--ghost { color: var(--ink-soft); background: transparent; border-color: var(--line); }
.btn--peach { color: #865d4c; background: var(--peach-pale); border-color: #f3d3c3; }
.btn--lavender { color: #665684; background: var(--lavender-pale); border-color: #ded3ef; }
.btn--danger { color: #a6505b; background: #fdecef; border-color: #f3cfd5; }
.btn--small { min-height: 32px; padding: 6px 10px; border-radius: 9px; font-size: 12px; }
.btn--icon { width: 40px; padding: 0; }
.theme-toggle { flex: 0 0 auto; font-size: 19px; }
.theme-toggle-icon { display: inline-grid; place-items: center; width: 1em; height: 1em; line-height: 1; }
.theme-toggle--auth { position: absolute; right: 22px; top: 22px; z-index: 2; background: color-mix(in srgb, var(--paper) 80%, transparent); backdrop-filter: blur(12px); }
.text-button { padding: 0; border: 0; background: none; color: var(--mint-deep); font-weight: 750; cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 25px 18px 20px;
  background: rgba(255,254,250,.88);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.sidebar .brand-lockup { padding: 0 8px 25px; }
.nav-list { display: grid; gap: 7px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 13px; border: 0; border-radius: 14px; background: transparent; color: var(--ink-soft); cursor: pointer; text-align: left; font-weight: 730; transition: background .14s, color .14s, transform .14s; }
.nav-item:hover { background: #f0f5ef; color: var(--ink); transform: translateX(2px); }
.nav-item.is-active { background: linear-gradient(130deg, var(--mint-pale), #edf6ee); color: #3f7667; box-shadow: inset 0 0 0 1px rgba(145,205,187,.28); }
.nav-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: rgba(255,255,255,.7); font-size: 16px; }
.sidebar-spacer { flex: 1; }
.cost-lock { margin: 16px 4px; padding: 12px; border: 1px solid #d9eadf; border-radius: 14px; background: #f4faf5; }
.cost-lock strong { display: block; color: #4f7d6f; font-size: 12px; }
.cost-lock span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.sidebar-user-copy { min-width: 0; flex: 1; }
.sidebar-user-copy strong, .sidebar-user-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-copy span { color: var(--muted); font-size: 11px; }

.avatar { position: relative; display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; overflow: hidden; border: 2px solid white; border-radius: 15px; background: linear-gradient(145deg, var(--butter-pale), var(--lavender-pale)); box-shadow: 0 4px 12px rgba(65,87,79,.13); color: #7f7195; font-weight: 850; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--large { width: 68px; height: 68px; border-radius: 22px; font-size: 25px; }
.avatar--tiny { width: 32px; height: 32px; border-radius: 11px; font-size: 12px; }
.main-dot { position: absolute; right: -2px; bottom: -2px; width: 13px; height: 13px; border: 2px solid white; border-radius: 50%; background: var(--butter); }

.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; height: 70px; padding: 0 var(--content-gutter); border-bottom: 1px solid rgba(223,232,225,.75); background: rgba(246,249,243,.8); backdrop-filter: blur(16px); }
.topbar-title { min-width: 0; }
.topbar-title strong { display: block; font-size: 18px; letter-spacing: -.035em; }
.topbar-title span { display: block; color: var(--muted); font-size: 11px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.topbar-task-settings { min-height: 36px; padding: 7px 11px; }
.main-content { width: 100%; min-width: 0; max-width: none; margin: 0; padding: clamp(22px, 2vw, 32px) var(--content-gutter) 80px; }
.main-content > * { min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin: 0 0 24px; }
.page-head > :first-child { min-width: min(100%, 260px); flex: 1 1 420px; }
.page-head h1 { margin: 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.05em; }
.page-head p { margin: 5px 0 0; color: var(--ink-soft); }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

.mobile-nav { display: none; }

.card { border: 1px solid rgba(203,217,208,.78); border-radius: var(--radius-lg); background: rgba(255,254,250,.92); box-shadow: var(--shadow-soft); }
.card-pad { padding: 21px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.card-title h2, .card-title h3 { margin: 0; font-size: 17px; letter-spacing: -.03em; }
.card-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 30px 2px 14px; }
.section-title h2 { margin: 0; font-size: 19px; letter-spacing: -.035em; }
.section-title span { color: var(--muted); font-size: 12px; }
.stack { display: grid; gap: 14px; }
.stack--tight { gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 15px; }

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
  gap: 25px;
  overflow: hidden;
  min-height: 220px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid #d4e6da;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(128deg, rgba(255,255,255,.92), rgba(239,248,239,.82)),
    var(--paper);
  box-shadow: var(--shadow);
}
.hero-card::before { content: ""; position: absolute; width: 330px; height: 330px; right: -115px; top: -175px; border-radius: 46% 54% 52% 48%; background: linear-gradient(145deg, var(--lavender-pale), var(--mint-pale)); transform: rotate(18deg); }
.hero-card::after { content: "✦"; position: absolute; right: 48px; top: 28px; color: rgba(185,169,219,.55); font-size: 31px; }
.hero-copy, .hero-progress { position: relative; z-index: 1; }
.hero-kicker { color: var(--mint-deep); font-size: 12px; font-weight: 850; letter-spacing: .04em; }
.hero-card h1 { margin: 8px 0 10px; font-size: clamp(28px, 4vw, 45px); line-height: 1.17; letter-spacing: -.055em; }
.hero-card p { margin: 0; max-width: 620px; color: var(--ink-soft); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-progress { display: flex; align-items: center; justify-content: center; gap: 20px; }

.progress-ring { --progress: 0; position: relative; display: grid; place-items: center; width: 126px; height: 126px; border-radius: 50%; background: conic-gradient(var(--mint-deep) calc(var(--progress) * 1%), #e7eee9 0); }
.progress-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--paper); }
.progress-ring-copy { position: relative; z-index: 1; text-align: center; }
.progress-ring-copy strong { display: block; font-size: 28px; line-height: 1; letter-spacing: -.04em; }
.progress-ring-copy span { color: var(--muted); font-size: 10px; }
.mini-progress { height: 7px; overflow: hidden; border-radius: 999px; background: #e7eee9; }
.mini-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--mint-deep)); }

.badge, .meta-pill { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: #f6f8f5; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.badge--mint { border-color: #c9e7da; background: var(--mint-pale); color: #487c6e; }
.badge--lavender { border-color: #ded4ef; background: var(--lavender-pale); color: #6c5b88; }
.badge--peach { border-color: #f0d2c3; background: var(--peach-pale); color: #8c6352; }
.badge--butter { border-color: #f0dfaf; background: var(--butter-pale); color: #806d39; }
.badge--danger { border-color: #f2d0d5; background: #fdecef; color: #a6505b; }

.character-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 17px; cursor: pointer; transition: transform .14s, border-color .14s, box-shadow .14s; }
.character-card:hover { transform: translateY(-2px); border-color: #bcd6c6; box-shadow: var(--shadow); }
.character-copy { min-width: 0; flex: 1; }
.character-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.character-copy p { margin: 2px 0 8px; color: var(--muted); font-size: 12px; }
.character-stats { text-align: right; }
.character-stats strong { display: block; font-size: 18px; }
.character-stats span { color: var(--muted); font-size: 10px; }
.subtree { margin-left: 25px; padding-left: 18px; border-left: 2px dashed #dce8df; }

.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--line); }
.summary-stat { padding: 18px; background: var(--paper); text-align: center; }
.summary-stat strong { display: block; font-size: 24px; letter-spacing: -.04em; }
.summary-stat span { color: var(--muted); font-size: 11px; }

.tabs { display: flex; gap: 4px; width: fit-content; max-width: 100%; padding: 5px; overflow-x: auto; border-radius: 15px; background: #eaf0ea; scrollbar-width: none; }
.tabs::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; min-width: 86px; padding: 9px 15px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 780; cursor: pointer; }
.tab.is-active { background: var(--paper-strong); color: var(--ink); box-shadow: var(--shadow-soft); }
.chips { display: flex; gap: 8px; margin: 17px 0; overflow-x: auto; scrollbar-width: none; }
.chip { flex: 0 0 auto; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.7); color: var(--ink-soft); cursor: pointer; font-size: 12px; font-weight: 730; }
.chip.is-active { border-color: #a9d4c3; background: var(--mint-pale); color: #49796c; }

.task-list { display: grid; gap: 12px; }
.task-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; min-height: 86px; padding: 16px 17px; border: 1px solid #ccd9d1; border-radius: 16px; background: #fffefa; box-shadow: 0 3px 11px rgba(52,66,62,.055); transition: border-color .13s, background .13s, box-shadow .13s; }
.task-card:hover { border-color: #a9c9b8; box-shadow: 0 6px 17px rgba(52,66,62,.085); }
.task-card.is-complete { border-color: #bdd9cb; background: #f5faf6; }
.task-card.is-complete .task-name { color: #52625c; text-decoration: line-through; text-decoration-color: #7eaa96; }
.task-check { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid #aebfb5; border-radius: 11px; background: white; cursor: pointer; font-size: 17px; font-weight: 700; }
.task-card.is-complete .task-check { border-color: var(--mint-deep); background: var(--mint-deep); color: white; }
.task-copy { min-width: 0; }
.task-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.task-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #27342f; font-size: 16px; font-weight: 700; line-height: 1.45; letter-spacing: -.015em; }
.task-scope-badge { min-height: 23px; padding: 3px 8px; color: #564872; font-size: 10px; font-weight: 700; }
.task-detail-line { display: flex; flex-wrap: wrap; align-items: stretch; gap: 11px 13px; width: max-content; max-width: 100%; margin-top: 11px; padding: 11px 13px; overflow: hidden; border: 1px solid #cbd8d0; border-radius: 13px; background: #f7faf7; box-shadow: inset 0 1px 0 rgba(255,255,255,.95); }
.task-facts { display: flex; flex: 0 1 auto; flex-wrap: wrap; gap: 8px; margin: 0; }
.task-facts > span { display: grid; align-content: center; gap: 3px; width: max-content; max-width: 100%; padding: 2px 12px 2px 9px; border-left: 3px solid #a997ce; }
.task-facts small { color: #5e4d76; font-size: 12px; font-weight: 700; line-height: 1.25; }
.task-facts strong { color: #27342f; font-size: 14px; font-weight: 700; line-height: 1.4; }
.task-control { display: flex; align-items: center; gap: 7px; }
.count-control { display: flex; align-items: center; gap: 8px; padding: 4px; border: 1px solid #cbd8d0; border-radius: 13px; background: white; }
.count-control button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 9px; background: #eaf1ec; cursor: pointer; color: #31413b; font-size: 20px; font-weight: 700; }
.count-control button:disabled { cursor: not-allowed; opacity: .38; }
.count-control strong { min-width: 48px; color: #27342f; text-align: center; font-size: 14px; font-weight: 700; }
.difficulty-select { min-width: 125px; }
.task-allowance { display: flex; flex-wrap: wrap; gap: 4px 9px; margin-top: 10px; padding: 9px 11px; border: 1px solid #c8e2d6; border-radius: 11px; background: var(--mint-pale); color: #49665d; font-size: 12px; line-height: 1.45; }
.task-allowance strong { color: #315f52; font-weight: 700; }
.exchange-flow { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: stretch; gap: 8px; width: max-content; max-width: 100%; margin: 0; }
.exchange-box { display: grid; align-content: center; flex: 0 0 auto; gap: 3px; width: max-content; max-width: 100%; padding: 2px 12px 2px 9px; border-left: 3px solid #d5a34b; }
.exchange-received-group { display: flex; flex: 0 0 auto; align-items: stretch; gap: 8px; max-width: 100%; }
.exchange-box--received { border-left-color: #61a58e; }
.exchange-flow small { color: #6c5421; font-size: 12px; font-weight: 700; line-height: 1.25; }
.exchange-box--received small { color: #376f60; }
.exchange-item { color: #27342f; font-size: 14px; font-weight: 700; line-height: 1.4; }
.exchange-item b { color: #24332e; font-variant-numeric: tabular-nums; }
.exchange-arrow { align-self: center; color: #41695d; font-size: 20px; font-weight: 700; }
.fixed-target { color: #367763; font-size: 12px; font-weight: 700; text-align: center; }

.task-filter-panel { position: sticky; top: 78px; z-index: 12; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 13px; padding: 8px; border: 1px solid rgba(203,217,208,.9); border-radius: 18px; background: rgba(246,249,243,.95); box-shadow: 0 7px 20px rgba(52,66,62,.07); backdrop-filter: blur(15px); }
.task-kind-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.task-kind-tab { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 1px solid #d7e0da; border-radius: 13px; background: rgba(255,255,255,.62); color: #637068; cursor: pointer; font-size: 15px; }
.task-kind-tab span { font-size: 17px; }
.task-kind-tab strong { font-weight: 800; }
.task-kind-tab--combat.is-active { border-color: #dba8a3; background: #faecea; color: #834f4a; box-shadow: 0 5px 14px rgba(139,82,75,.1); }
.task-kind-tab--life.is-active { border-color: #8fc5ad; background: #e8f4ed; color: #396d59; box-shadow: 0 5px 14px rgba(64,115,92,.1); }
.task-overall { display: grid; justify-items: end; padding: 0 8px; line-height: 1.2; }
.task-overall strong { color: #27342f; font-size: 17px; }
.task-overall span { margin-top: 3px; color: #68766f; font-size: 11px; }

.task-owner-card { display: block; scroll-margin-top: 158px; padding: 14px 16px 16px; }
.task-owner-card--account { margin-bottom: 18px; border-color: #d7cdec; background: linear-gradient(140deg, #fffefa, #faf7fd); }
.task-owner-card--main { border-color: #e3d39f; box-shadow: 0 7px 20px rgba(115,91,38,.07); }
.task-owner-summary { min-width: 0; padding-bottom: 12px; border-bottom: 1px solid #dfe7e1; }
.task-owner-head { display: grid; grid-template-columns: minmax(190px, 280px) minmax(120px, 1fr) auto; align-items: center; gap: 14px; }
.task-owner-identity { display: flex; align-items: center; min-width: 0; gap: 11px; }
.task-owner-symbol { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 14px; background: var(--lavender-pale); color: #695985; font-size: 20px; }
.avatar--task-owner { width: 46px; height: 46px; border-radius: 15px; font-size: 16px; }
.task-owner-name { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.task-owner-name > strong { overflow: hidden; color: #27342f; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.task-owner-identity p { margin: 2px 0 0; color: #6a7871; font-size: 11px; }
.task-owner-head-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.task-owner-progress { display: grid; flex: 0 0 auto; justify-items: end; line-height: 1.2; }
.task-owner-progress strong { color: #27342f; font-size: 16px; font-variant-numeric: tabular-nums; }
.task-owner-progress span { margin-top: 3px; color: #6b7972; font-size: 10px; }
.task-owner-collapse { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid #d3ded7; border-radius: 10px; background: white; color: #4f625a; cursor: pointer; font-size: 17px; font-weight: 700; }
.task-owner-progress-bar { width: 100%; min-width: 0; margin-top: 0; }
.task-owner-summary > .task-owner-head > .task-owner-progress { justify-items: end; }
.task-owner-body { display: grid; gap: 17px; margin-top: 13px; }
.task-owner-body--account { margin-top: 13px; }
.task-owner-periods { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 16px; }
.task-owner-card.is-collapsed { padding-bottom: 14px; }
.task-owner-card.is-collapsed .task-owner-summary { padding-bottom: 0; border-bottom: 0; }
.character-task-grid { display: grid; grid-template-columns: 1fr; align-items: start; gap: 12px; }
.character-task-heading { margin-top: 20px; }
.task-period-section { display: grid; min-width: 0; align-content: start; gap: 10px; }
.task-period-section + .task-period-section { padding-top: 14px; border-top: 1px solid #dfe7e1; }
.task-period-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.task-period-heading h3 { margin: 0; color: #35453e; font-size: 14px; }
.task-period-heading p { margin: 1px 0 0; color: #78847e; font-size: 10px; }
.task-period-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: #e9f4ed; color: #47745f; font-size: 14px; font-weight: 800; }
.task-period-section--weekly .task-period-icon { background: #f0eafa; color: #6e5a91; }
.task-period-section--weekend .task-period-icon { background: #fff1d9; color: #9a7131; }
.task-period-progress { min-width: 39px; padding: 5px 8px; border-radius: 999px; background: #edf3ee; color: #53655c; font-size: 11px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.task-period-section--weekly .task-period-progress { background: #f3eef9; color: #6a5a84; }
.task-period-section--weekend .task-period-progress { background: #fff4e3; color: #866632; }
.task-period-content { display: grid; min-width: 0; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; gap: 10px; }
.task-period-section--daily .task-period-content { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.task-period-section--daily .task-category-group { flex: 1 1 230px; }
.task-period-section--daily .compact-task-list { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.task-period-section--daily .compact-task-row { min-height: 46px; }
.account-task-groups { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); align-items: start; }
.account-task-groups .task-category-group { padding: 10px; border-left: 3px solid #cdbfe4; border-radius: 10px; background: rgba(255,255,255,.68); }
.account-task-groups .task-category-title { margin-bottom: 8px; }
.task-category-group { min-width: 0; }
.task-category-title { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; color: #42534c; }
.task-category-title::after { content: ""; height: 1px; flex: 1; background: #e1e8e3; }
.task-category-title h3 { margin: 0; font-size: 13px; }
.task-category-count { order: 2; display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 999px; background: #edf3ee; color: #64736c; font-size: 10px; }
.task-category-toggle { order: 3; display: inline-flex; align-items: center; gap: 4px; min-height: 27px; border: 1px solid #d2ddd6; border-radius: 9px; padding: 3px 7px 3px 4px; background: #fff; color: #596960; cursor: pointer; font: inherit; font-size: 10px; font-weight: 800; white-space: nowrap; transition: border-color .12s, background .12s, color .12s; }
.task-category-toggle:hover { border-color: #97b8aa; background: #f3f8f5; }
.task-category-toggle:disabled { cursor: wait; opacity: .58; }
.task-category-toggle-box { display: grid; place-items: center; width: 18px; height: 18px; border: 2px solid #aebdb5; border-radius: 6px; background: #fff; color: transparent; font-size: 11px; font-weight: 900; line-height: 1; }
.task-category-toggle em { font-style: normal; }
.task-category-toggle.is-complete { border-color: #9bcbb9; background: #e5f5ed; color: #356755; }
.task-category-toggle.is-complete .task-category-toggle-box { border-color: #4f9f89; background: #4f9f89; color: #fff; }
.task-category-toggle.is-partial { border-color: #e1ca8c; background: #fff7df; color: #76602c; }
.task-category-toggle.is-partial .task-category-toggle-box { border-color: #c49a3f; background: #f3dc99; color: #664c16; }
.compact-task-list { display: grid; gap: 6px; }
.compact-task-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 50px; padding: 8px 9px 8px 12px; border: 1px solid #dbe4de; border-radius: 12px; background: #fff; transition: border-color .12s, background .12s; }
.compact-task-row:hover { border-color: #b9cfc2; }
.compact-task-row.is-complete { border-color: #c5ddcf; background: #f1f8f3; }
.compact-task-row.is-complete .compact-task-name { color: #52645c; text-decoration: line-through; text-decoration-color: #82aa97; }
.compact-task-main { position: relative; display: flex; align-items: center; min-width: 0; gap: 7px; }
.compact-task-row--account { min-height: 62px; }
.compact-task-row--account .compact-task-name { display: -webkit-box; flex: 1 1 110px; overflow: hidden; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.compact-task-name { min-width: 0; overflow: hidden; border: 0; padding: 4px 0; background: transparent; color: #293730; font-size: 14px; font-weight: 700; line-height: 1.35; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
button.compact-task-name { cursor: pointer; }
.task-info-button { display: grid; place-items: center; flex: 0 0 auto; width: 23px; height: 23px; border: 1px solid #ccd9d1; border-radius: 50%; background: #f5f8f5; color: #526a60; cursor: pointer; font-family: Georgia, serif; font-size: 13px; font-weight: 700; }
.compact-task-control { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.compact-count-control { gap: 5px; padding: 3px; border-radius: 11px; }
.compact-count-control button { width: 30px; height: 30px; border-radius: 8px; font-size: 18px; }
.compact-count-control strong { min-width: 40px; font-size: 13px; }
.compact-task-check { width: 32px; height: 32px; border-radius: 10px; font-size: 16px; }
.compact-difficulty { min-width: 102px; height: 34px; padding-inline: 9px; font-size: 12px; }
.task-detail-popover { position: absolute; left: 0; top: calc(100% + 7px); z-index: 35; display: none; width: min(360px, calc(100vw - 70px)); padding: 14px; border: 1px solid #cbd8d0; border-radius: 14px; background: rgba(255,254,250,.98); box-shadow: 0 16px 36px rgba(42,57,50,.18); }
.task-detail-popover::before { content: ""; position: absolute; left: 24px; top: -6px; width: 10px; height: 10px; border-left: 1px solid #cbd8d0; border-top: 1px solid #cbd8d0; background: #fffefa; transform: rotate(45deg); }
.task-detail-popover-title { display: block; color: #27342f; font-size: 14px; }
.task-detail-popover .task-detail-line { width: 100%; margin-top: 10px; }
.task-detail-popover .task-allowance { margin-top: 10px; }
.task-detail-sheet .task-detail-line { width: 100%; margin-top: 0; }
.task-detail-sheet .task-allowance { margin-top: 12px; }
.task-settings-character { display: grid; gap: 7px; margin-bottom: 15px; }
.task-settings-character > span { color: #53635c; font-size: 12px; font-weight: 700; }
.settings-period-list { display: grid; gap: 18px; }
.settings-period-section { display: grid; gap: 9px; }
.settings-period-section > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 12px; background: #edf6f0; }
.settings-period-section--weekly > header { background: #f3eef9; }
.settings-period-section--weekend > header { background: #fff3df; }
.settings-period-section > header > span { font-size: 15px; }
.settings-period-section > header strong, .settings-period-section > header small { display: block; }
.settings-period-section > header strong { color: #34463e; font-size: 14px; }
.settings-period-section > header small { margin-top: 1px; color: #748078; font-size: 10px; }
.settings-period-section > header em { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 999px; background: rgba(255,255,255,.72); color: #617068; font-size: 10px; font-style: normal; font-weight: 800; }

.task-layout-switch { display: inline-grid; grid-template-columns: repeat(2, 1fr); gap: 3px; padding: 3px; border: 1px solid #d8e2db; border-radius: 11px; background: #edf2ee; }
.task-layout-option { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 62px; height: 30px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: #718079; cursor: pointer; font-size: 12px; font-weight: 800; }
.task-layout-option span { font-size: 14px; line-height: 1; }
.task-layout-option em { font-style: normal; }
.task-layout-option.is-active { background: #fff; color: #3f7465; box-shadow: 0 3px 9px rgba(64,88,77,.1); }

.social-task-kind-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 14px; padding: 7px; border: 1px solid rgba(203,217,208,.9); border-radius: 16px; background: rgba(246,249,243,.92); }

.sheet-board { overflow: visible; margin-top: 14px; padding: 18px 18px 0; }
.sheet-board-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.sheet-board-intro h2 { margin: 7px 0 2px; color: #2d3c36; font-size: 19px; letter-spacing: -.035em; }
.sheet-board-intro p { margin: 0; color: #718079; font-size: 11px; }
.sheet-scroll-hint { flex: 0 0 auto; color: #65756e; font-size: 11px; font-weight: 750; }
.sheet-table-wrap { position: relative; max-height: calc(100vh - 205px); margin: 0 -18px; overflow: auto; overscroll-behavior: contain; border-top: 1px solid #cfdad3; border-radius: 0 0 var(--radius-lg) var(--radius-lg); scrollbar-gutter: stable; }
.sheet-table { --sheet-character: 176px; --sheet-server: 72px; --sheet-job: 96px; --sheet-power: 82px; --sheet-magic: 82px; --sheet-progress: 72px; width: max-content; min-width: max-content; border: 0; border-collapse: separate; border-spacing: 0; color: #314039; font-size: 13px; table-layout: fixed; }
.sheet-table th, .sheet-table td { box-sizing: border-box; border-right: 1px solid #d8e1db; border-bottom: 1px solid #d8e1db; }
.sheet-table tr > :last-child { border-right: 0; }
.sheet-table thead th { position: sticky; z-index: 8; padding: 4px 5px; color: #43544c; text-align: center; }
.sheet-static-head { top: 0; z-index: 18 !important; height: 114px; background: #eaf0eb; vertical-align: middle; font-size: 12px; line-height: 1.3; }
.sheet-period-row th:not(.sheet-static-head) { top: 0; height: 29px; padding-block: 3px; font-size: 12px; font-weight: 850; }
.sheet-period-head--daily { background: #e3f2ea; color: #3f725e !important; }
.sheet-period-head--weekly { background: #eee8f8; color: #675885 !important; }
.sheet-period-head--weekend { background: #fff0d5; color: #8a682d !important; }
.sheet-category-row th { top: 29px; height: 27px; background: #f2f5f2; color: #68766f; font-size: 11px; font-weight: 800; }
.sheet-task-row th { top: 56px; height: 58px; background: #fffefa; vertical-align: middle; }
.sheet-task-head { width: 90px; min-width: 90px; max-width: 90px; overflow: visible; }
.sheet-category-all-head, .sheet-category-all-cell { width: 48px; min-width: 48px; max-width: 48px; }
.sheet-category-all-head { background: #edf3ee !important; color: #63736b !important; font-size: 10px; }
.sheet-task-head > button { display: -webkit-box; width: 100%; max-height: 46px; overflow: hidden; border: 0; padding: 2px; background: transparent; color: #2e3b35; cursor: pointer; font-size: 12px; font-weight: 800; line-height: 1.25; word-break: keep-all; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.sheet-header-tooltip { position: absolute; left: 50%; top: calc(100% + 7px); z-index: 60; display: none; width: 310px; padding: 13px; border: 1px solid #c8d5cd; border-radius: 13px; background: rgba(255,254,250,.99); box-shadow: 0 15px 34px rgba(42,57,50,.2); color: var(--ink); text-align: left; transform: translateX(-50%); }
.sheet-header-tooltip::before { content: ""; position: absolute; left: calc(50% - 5px); top: -6px; width: 10px; height: 10px; border-left: 1px solid #c8d5cd; border-top: 1px solid #c8d5cd; background: #fffefa; transform: rotate(45deg); }
.sheet-header-tooltip > strong, .sheet-header-tooltip > span { display: block; }
.sheet-header-tooltip > strong { color: #27342f; font-size: 13px; }
.sheet-header-tooltip > span { margin: 2px 0 8px; color: #748078; font-size: 10px; }
.sheet-header-tooltip .task-detail-line { width: 100%; margin-top: 8px; padding: 9px; }
.sheet-header-tooltip .task-facts small, .sheet-header-tooltip .exchange-flow small { font-size: 10px; }
.sheet-header-tooltip .task-facts strong, .sheet-header-tooltip .exchange-item { font-size: 11px; }
.sheet-header-tooltip .task-allowance { margin-top: 8px; font-size: 10px; }

.sheet-col-character { left: 0; width: var(--sheet-character); min-width: var(--sheet-character); max-width: var(--sheet-character); }
.sheet-col-server { left: var(--sheet-character); width: var(--sheet-server); min-width: var(--sheet-server); max-width: var(--sheet-server); }
.sheet-col-job { left: calc(var(--sheet-character) + var(--sheet-server)); width: var(--sheet-job); min-width: var(--sheet-job); max-width: var(--sheet-job); }
.sheet-col-power { left: calc(var(--sheet-character) + var(--sheet-server) + var(--sheet-job)); width: var(--sheet-power); min-width: var(--sheet-power); max-width: var(--sheet-power); }
.sheet-col-magic { left: calc(var(--sheet-character) + var(--sheet-server) + var(--sheet-job) + var(--sheet-power)); width: var(--sheet-magic); min-width: var(--sheet-magic); max-width: var(--sheet-magic); }
.sheet-col-progress { left: calc(var(--sheet-character) + var(--sheet-server) + var(--sheet-job) + var(--sheet-power) + var(--sheet-magic)); width: var(--sheet-progress); min-width: var(--sheet-progress); max-width: var(--sheet-progress); box-shadow: 5px 0 9px rgba(54,72,64,.07); }
.sheet-table tbody .sheet-col-character,
.sheet-table tbody .sheet-col-server,
.sheet-table tbody .sheet-col-job,
.sheet-table tbody .sheet-col-power,
.sheet-table tbody .sheet-col-magic,
.sheet-table tbody .sheet-col-progress { position: sticky; z-index: 4; }
.sheet-table thead .sheet-col-character,
.sheet-table thead .sheet-col-server,
.sheet-table thead .sheet-col-job,
.sheet-table thead .sheet-col-power,
.sheet-table thead .sheet-col-magic,
.sheet-table thead .sheet-col-progress { position: sticky; }

.sheet-table tbody tr > * { height: 56px; padding: 4px; background: #fffefa; text-align: center; }
.sheet-table tbody tr:hover > * { background: #f9fbf8; }
.sheet-table tbody .sheet-account-row > * { background: #f4effb; }
.sheet-table tbody .sheet-account-row:hover > * { background: #eee7f8; }
.sheet-table tbody .sheet-main-row > * { background: #fffaf0; }
.sheet-table tbody .sheet-main-row:hover > * { background: #fff5df; }
.sheet-row-identity { padding-inline: 8px !important; text-align: left !important; }
.sheet-row-identity .avatar { display: inline-grid; margin-right: 6px; vertical-align: middle; }
.sheet-row-identity > span:not(.avatar):last-child { display: inline-flex; max-width: calc(100% - 44px); flex-direction: column; vertical-align: middle; }
.sheet-row-identity strong { display: block; overflow: hidden; color: #293730; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.sheet-row-identity small { display: block; margin-top: 1px; color: #84759b; font-size: 10px; font-weight: 750; }
.avatar--sheet { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
.sheet-account-symbol { display: inline-grid !important; place-items: center; width: 32px; height: 32px; margin-right: 6px; border-radius: 10px; background: #e4daf3; color: #705f90; font-size: 15px; vertical-align: middle; }
.sheet-col-server, .sheet-col-job, .sheet-col-power, .sheet-col-magic, .sheet-col-progress { color: #5f6e67; font-variant-numeric: tabular-nums; }
.sheet-meta-input { width: 100%; min-width: 0; height: 32px; border: 1px solid transparent; border-radius: 7px; padding: 3px 4px; background: transparent; color: #43534c; font: inherit; font-size: 13px; font-weight: 800; text-align: center; transition: border-color .14s, background .14s, box-shadow .14s; }
.sheet-meta-input::placeholder { color: #9aa69f; font-size: 10px; font-weight: 700; }
.sheet-meta-input:hover { border-color: #c7d5cd; background: rgba(255,255,255,.72); }
.sheet-meta-input:focus { outline: 0; border-color: #70a997; background: #fff; box-shadow: 0 0 0 2px rgba(112,169,151,.18); }
.sheet-meta-input.is-saving { opacity: .56; }
.sheet-meta-input.is-saved { border-color: #74ad9a; background: #e7f5ee; }
.sheet-meta-input--number { font-variant-numeric: tabular-nums; }
.sheet-meta-input--number::-webkit-inner-spin-button, .sheet-meta-input--number::-webkit-outer-spin-button { margin: 0; appearance: none; }
.sheet-col-progress strong, .sheet-col-progress small { display: block; }
.sheet-col-progress strong { color: #365f53; font-size: 14px; }
.sheet-col-progress small { margin-top: 1px; color: #839089; font-size: 10px; }

.sheet-task-cell { width: 90px; min-width: 90px; max-width: 90px; padding: 3px !important; transition: background .12s; }
.sheet-category-all-cell { padding: 3px !important; transition: background .12s; }
.sheet-table tbody .sheet-category-all-cell.is-complete { background: #dff2e9; }
.sheet-table tbody .sheet-category-all-cell.is-partial { background: #fff3cf; }
.sheet-table tbody .sheet-category-all-cell.is-unavailable { background: #eff2ef; color: #a8b0ac; font-size: 13px; }
.sheet-category-all-toggle { display: grid; width: 100%; min-height: 44px; grid-template-rows: 22px auto; justify-items: center; align-content: center; gap: 1px; border: 0; border-radius: 8px; padding: 1px; background: transparent; }
.sheet-category-all-toggle:hover { border-color: transparent; background: rgba(145,205,187,.16); }
.sheet-category-all-toggle .task-category-toggle-box { width: 22px; height: 22px; border-radius: 7px; }
.sheet-category-all-toggle em { font-size: 9px; line-height: 1; }
.sheet-table tbody .sheet-task-cell.is-complete { background: #dff2e9; }
.sheet-table tbody .sheet-task-cell.is-unavailable { background: #eff2ef; color: #a8b0ac; font-size: 13px; }
.sheet-task-toggle { display: grid; place-items: center; width: 100%; min-height: 44px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.sheet-task-toggle span, .sheet-readonly-check { display: grid; place-items: center; width: 25px; height: 25px; margin: auto; border: 2px solid #b4c1b9; border-radius: 8px; background: #fff; color: #fff; font-size: 14px; font-weight: 900; }
.is-complete .sheet-task-toggle span, .is-complete .sheet-readonly-check { border-color: #4f9f89; background: #4f9f89; }
.sheet-task-toggle:hover { background: rgba(145,205,187,.14); }
.sheet-count-control { display: grid; grid-template-columns: 24px minmax(34px, 1fr) 24px; align-items: center; gap: 2px; }
.sheet-count-control button { display: grid; place-items: center; width: 24px; height: 28px; border: 0; border-radius: 7px; background: #e8efea; color: #405249; cursor: pointer; font-size: 16px; font-weight: 800; }
.sheet-count-control button:disabled { cursor: not-allowed; opacity: .35; }
.sheet-count-control strong { font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet-difficulty { width: 100%; height: 23px; margin-bottom: 1px; border: 1px solid #cbd7d0; border-radius: 7px; background: #fff; color: #53635c; font-size: 10px; }
.sheet-difficulty + .sheet-task-toggle { min-height: 27px; }
.sheet-difficulty + .sheet-task-toggle span { width: 23px; height: 23px; border-radius: 7px; font-size: 13px; }
.sheet-table--readonly .sheet-task-cell { cursor: default; }
.sheet-readonly-count { color: #3c5b51; font-size: 11px; font-variant-numeric: tabular-nums; }
.sheet-readonly-difficulty { display: block; margin-bottom: 3px; overflow: hidden; color: #6f7d76; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.social-sheet-section { margin-top: 28px; }
.sheet-board-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 2px 13px; }
.sheet-board-toolbar h2 { margin: 0; font-size: 19px; letter-spacing: -.035em; }
.sheet-board-toolbar p { margin: 3px 0 0; color: #718079; font-size: 11px; }
.sheet-board-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.social-table-loading { display: flex; align-items: center; justify-content: center; gap: 11px; min-height: 116px; margin-top: 28px; color: #66756e; }
.spinner--small { width: 26px; height: 26px; border-width: 3px; }
.social-user-sheet { overflow: hidden; margin-bottom: 13px; }
.social-user-sheet-head { display: flex; align-items: center; gap: 10px; min-height: 66px; padding: 9px 11px; background: linear-gradient(120deg, #f7faf7, #fbf9fd); }
.social-user-sheet.is-collapsed .social-user-sheet-head { min-height: 60px; }
.social-user-sheet-toggle { display: grid; flex: 1; min-width: 0; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; border: 0; padding: 0; background: transparent; cursor: pointer; text-align: left; }
.avatar--sheet-user { width: 40px; height: 40px; border-radius: 13px; font-size: 14px; }
.social-user-sheet-copy, .social-user-sheet-progress { min-width: 0; }
.social-user-sheet-copy strong, .social-user-sheet-copy small, .social-user-sheet-progress strong, .social-user-sheet-progress small { display: block; }
.social-user-sheet-copy strong { overflow: hidden; color: #293730; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.social-user-sheet-copy small { margin-top: 1px; color: #7c8983; font-size: 10px; }
.social-user-sheet-progress { text-align: right; font-variant-numeric: tabular-nums; }
.social-user-sheet-progress strong { color: #3f7465; font-size: 14px; }
.social-user-sheet-progress small { color: #87938d; font-size: 9px; }
.social-user-sheet-chevron { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #d3ded7; border-radius: 9px; background: #fff; color: #53645c; font-weight: 800; }
.social-user-sheet .sheet-table-wrap { max-height: min(64vh, 620px); margin: 0; border-radius: 0; }

@media (hover: hover) and (pointer: fine) {
  .compact-task-main:hover .task-detail-popover,
  .compact-task-detail-trigger:focus-visible ~ .task-detail-popover { display: block; }
  .compact-task-row.is-popover-dismissed .task-detail-popover { display: none; }
  .sheet-task-head:hover .sheet-header-tooltip,
  .sheet-task-head > button:focus-visible + .sheet-header-tooltip { display: block; }
}

.empty-state { display: grid; place-items: center; min-height: 220px; padding: 35px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: rgba(255,255,255,.4); text-align: center; }
.empty-state-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 12px; border-radius: 19px; background: var(--lavender-pale); color: #756492; font-size: 24px; }
.empty-state h3 { margin: 0 0 6px; font-size: 17px; }
.empty-state p { max-width: 440px; margin: 0 0 18px; color: var(--muted); font-size: 13px; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-copy { min-width: 0; flex: 1; }
.list-copy strong { display: block; }
.list-copy span, .list-copy p { display: block; margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.list-actions { display: flex; gap: 6px; }

.timer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.timer-card { position: relative; overflow: hidden; min-height: 210px; padding: 24px; }
.timer-card::after { content: ""; position: absolute; width: 150px; height: 150px; right: -65px; bottom: -70px; border-radius: 50%; background: var(--mint-pale); }
.timer-card--field::after { background: var(--peach-pale); }
.timer-label { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; }
.timer-card h2 { position: relative; z-index: 1; margin: 18px 0 2px; font-size: 38px; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.timer-card p { position: relative; z-index: 1; margin: 0; color: var(--ink-soft); }
.timer-timeline { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 22px; }
.timeline-step { padding: 8px 7px; border-radius: 10px; background: rgba(255,255,255,.72); color: var(--muted); font-size: 10px; text-align: center; }
.timeline-step strong { display: block; color: var(--ink-soft); font-size: 12px; }
.timeline-step.is-active { background: var(--mint-pale); color: var(--mint-deep); }

.info-card { padding: 19px; }
.info-card h3 { margin: 0 0 7px; font-size: 16px; }
.info-card p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.info-card .badge { margin-bottom: 12px; }

.guild-banner { position: relative; overflow: hidden; padding: 28px; border-radius: var(--radius-xl); color: #31433d; background: linear-gradient(125deg, color-mix(in srgb, var(--guild-color, #91cdbb) 30%, white), #fffef9); border: 1px solid color-mix(in srgb, var(--guild-color, #91cdbb) 45%, white); box-shadow: var(--shadow); }
.guild-banner::after { content: "♜"; position: absolute; right: 28px; bottom: -28px; color: color-mix(in srgb, var(--guild-color, #91cdbb) 45%, transparent); font-size: 115px; line-height: 1; }
.guild-banner > * { position: relative; z-index: 1; }
.guild-crest { float: left; width: 76px; height: 76px; margin: 0 17px 10px 0; border: 3px solid rgba(255,255,255,.82); border-radius: 22px; object-fit: cover; box-shadow: var(--shadow-soft); }
.guild-banner h1 { margin: 5px 0 4px; font-size: 34px; letter-spacing: -.05em; }
.guild-banner p { max-width: 680px; margin: 0; color: #61726c; }

.ship-summary { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 15px; padding: 18px; border-radius: 16px; background: linear-gradient(120deg, var(--butter-pale), #fff); }
.ship-stage { text-align: center; }
.ship-stage strong { display: block; font-size: 25px; }
.ship-stage span { color: var(--muted); font-size: 11px; }
.ship-arrow { color: #aa9559; font-size: 20px; }
.material-list { display: grid; gap: 8px; }
.material-row { display: grid; grid-template-columns: minmax(110px, 1fr) repeat(3, minmax(70px, .6fr)); align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: #f7f8f5; }
.material-row strong { font-size: 13px; }
.material-value { text-align: right; font-variant-numeric: tabular-nums; }
.material-value span { display: block; color: var(--muted); font-size: 9px; }
.material-short { color: #b45d66; font-weight: 800; }

.notice { padding: 15px 0; border-bottom: 1px solid var(--line); }
.notice:last-child { border-bottom: 0; }
.notice h4 { margin: 0 0 4px; }
.notice p { margin: 0 0 8px; white-space: pre-wrap; color: var(--ink-soft); }
.notice-meta { color: var(--muted); font-size: 10px; }

.note-card { position: relative; padding: 18px; }
.note-card h3 { margin: 0 70px 7px 0; font-size: 15px; }
.note-card p { margin: 0; white-space: pre-wrap; color: var(--ink-soft); font-size: 13px; }
.note-actions { position: absolute; right: 12px; top: 12px; display: flex; gap: 4px; }

.catalog-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.catalog-toolbar .input { width: min(280px, 100%); }
.catalog-list { max-height: 650px; overflow: auto; border: 1px solid var(--line); border-radius: 15px; }
.catalog-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) .7fr .7fr auto; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.catalog-row:last-child { border-bottom: 0; }
.catalog-name { min-width: 0; }
.catalog-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-name span { color: var(--muted); font-size: 10px; }

.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--muted); }
.status-dot--active { background: var(--mint-deep); }
.status-dot--pending, .status-dot--review { background: #d3a647; }
.status-dot--suspended, .status-dot--rejected, .status-dot--deleted { background: var(--rose); }
.status-dot--planned { background: var(--lavender); }

.settings-list { display: grid; gap: 8px; }
.setting-row { display: grid; grid-template-columns: minmax(180px, 1fr) 100px 120px 140px; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.setting-row.is-hidden { opacity: .62; background: #f4f5f2; }
.setting-name strong { display: block; }
.setting-name span { color: var(--muted); font-size: 10px; }

.segmented { display: inline-flex; padding: 4px; border-radius: 12px; background: #edf2ed; }
.segmented button { padding: 7px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 750; }
.segmented button.is-active { background: white; color: var(--ink); box-shadow: var(--shadow-soft); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(44,56,52,.38); backdrop-filter: blur(5px); animation: fade-in .14s ease-out; }
.modal { width: min(620px, 100%); max-height: min(88vh, 840px); overflow: auto; padding: 24px; border: 1px solid rgba(255,255,255,.7); border-radius: 24px; background: var(--paper); box-shadow: 0 26px 70px rgba(35,50,44,.23); animation: modal-in .18s ease-out; }
.modal--wide { width: min(920px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.modal-head h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.modal-close { display: grid; place-items: center; flex: 0 0 auto; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 11px; background: white; cursor: pointer; }

.avatar-editor { min-width: 0; margin: 19px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(244,250,245,.8), rgba(250,247,255,.72)); }
.avatar-editor legend { padding: 0 7px; color: var(--ink-soft); font-size: 13px; font-weight: 800; }
.avatar-editor legend span { color: var(--muted); font-size: 11px; font-weight: 650; }
.avatar-editor-grid { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); align-items: center; gap: 18px; }
.avatar-crop-frame { position: relative; width: min(240px, 100%); aspect-ratio: 1; overflow: hidden; border: 2px dashed #c8d9cf; border-radius: 26px; background: linear-gradient(145deg, var(--butter-pale), var(--lavender-pale)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); outline: none; touch-action: none; user-select: none; }
.avatar-crop-frame.has-image { border-style: solid; border-color: rgba(145,205,187,.8); cursor: grab; }
.avatar-crop-frame.has-image:focus-visible { box-shadow: 0 0 0 4px rgba(145,205,187,.26); }
.avatar-crop-frame.is-dragging { cursor: grabbing; }
.avatar-crop-frame::after { content: ""; position: absolute; inset: 9px; z-index: 2; border: 1px solid rgba(255,255,255,.72); border-radius: 19px; box-shadow: 0 0 0 999px rgba(55,67,62,.04); pointer-events: none; }
.avatar-crop-image { position: absolute; left: 50%; top: 50%; z-index: 1; max-width: none; max-height: none; pointer-events: none; user-select: none; will-change: width, height, transform; }
.avatar-crop-placeholder { position: absolute; inset: 0; display: grid; z-index: 1; place-content: center; justify-items: center; gap: 8px; color: #84779a; text-align: center; pointer-events: none; }
.avatar-crop-placeholder strong { display: grid; place-items: center; width: 68px; height: 68px; border: 2px solid rgba(255,255,255,.88); border-radius: 22px; background: rgba(255,255,255,.58); box-shadow: var(--shadow-soft); font-size: 28px; }
.avatar-crop-placeholder span { color: var(--muted); font-size: 11px; font-weight: 700; }
.avatar-crop-controls { display: grid; align-content: center; gap: 12px; min-width: 0; }
.avatar-crop-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-zoom-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.avatar-zoom-label output { color: var(--mint-deep); font-variant-numeric: tabular-nums; }
.avatar-zoom { width: 100%; margin: 0; accent-color: var(--mint-deep); cursor: pointer; }
.avatar-zoom:disabled { cursor: not-allowed; opacity: .45; }
.avatar-crop-hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 9px; width: min(360px, calc(100vw - 40px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,254,250,.97); box-shadow: var(--shadow); animation: toast-in .2s ease-out; pointer-events: auto; }
.toast--error { border-color: #efcbd1; }
.toast-icon { color: var(--mint-deep); font-weight: 900; }
.toast--error .toast-icon { color: var(--rose); }
.toast-copy { flex: 1; font-size: 13px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.loading-overlay { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(246,249,243,.65); backdrop-filter: blur(2px); }
.spinner { width: 42px; height: 42px; border: 4px solid #dce9e1; border-top-color: var(--mint-deep); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.cost-proof { display: flex; align-items: flex-start; gap: 13px; padding: 16px; border: 1px solid #cfe5d8; border-radius: 15px; background: #f3faf5; }
.cost-proof-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px; background: var(--mint-pale); color: var(--mint-deep); font-weight: 900; }
.cost-proof strong { display: block; color: #477769; }
.cost-proof p { margin: 2px 0 0; color: #6f847b; font-size: 11px; }

.weekend-closed { padding: 18px; border: 1px solid #e8dbba; border-radius: 15px; background: var(--butter-pale); color: #796b43; }
.weekend-closed strong { display: block; margin-bottom: 3px; }
.weekend-closed p { margin: 0; font-size: 12px; }

@media (max-width: 1050px) {
  :root { --sidebar-width: 210px; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-progress { justify-content: flex-start; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setting-row { grid-template-columns: minmax(160px, 1fr) 90px 110px; }
  .setting-row > :last-child { grid-column: 2 / -1; }
  .task-owner-head { grid-template-columns: minmax(170px, 240px) minmax(100px, 1fr) auto; gap: 12px; }
  .task-owner-periods { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .sheet-table { --sheet-character: 156px; --sheet-server: 68px; --sheet-job: 90px; --sheet-power: 78px; --sheet-magic: 78px; --sheet-progress: 68px; }
  .sheet-table tbody .sheet-col-server,
  .sheet-table tbody .sheet-col-job,
  .sheet-table tbody .sheet-col-power,
  .sheet-table tbody .sheet-col-magic,
  .sheet-table tbody .sheet-col-progress,
  .sheet-table thead .sheet-col-server,
  .sheet-table thead .sheet-col-job,
  .sheet-table thead .sheet-col-power,
  .sheet-table thead .sheet-col-magic,
  .sheet-table thead .sheet-col-progress { position: static; }
  .sheet-table tbody .sheet-col-character { z-index: 5; }
  .sheet-table thead .sheet-col-character { z-index: 19 !important; }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-panel { padding: 18px; }
  .auth-card { padding: 26px 22px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .workspace { min-height: 100vh; }
  .topbar { height: 60px; padding: 0 17px; }
  .topbar-title strong { font-size: 16px; }
  .topbar-title span { display: none; }
  .top-actions { gap: 4px; }
  .top-actions > .badge { display: none; }
  .top-actions .btn span { display: none; }
  .top-actions .theme-toggle .theme-toggle-icon { display: inline-grid; }
  .task-layout-switch { gap: 2px; padding: 2px; border-radius: 10px; }
  .task-layout-option { min-width: 32px; width: 32px; height: 30px; padding: 0; }
  .task-layout-option em { display: none; }
  .main-content { width: 100%; min-width: 0; padding: 22px 15px calc(92px + env(safe-area-inset-bottom)); }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px 5px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(203,217,208,.85); background: rgba(255,254,250,.94); box-shadow: 0 -8px 24px rgba(65,87,79,.08); backdrop-filter: blur(18px); }
  .mobile-nav-item { display: grid; justify-items: center; gap: 2px; padding: 5px 2px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; }
  .mobile-nav-item .nav-icon { width: 29px; height: 27px; background: transparent; font-size: 17px; }
  .mobile-nav-item.is-active { color: var(--mint-deep); }
  .mobile-nav-item.is-active .nav-icon { background: var(--mint-pale); }
  .page-head { align-items: flex-start; margin-bottom: 18px; }
  .page-head h1 { font-size: 25px; }
  .page-head p { font-size: 12px; }
  .page-actions { justify-content: flex-end; }
  .task-filter-panel { top: 67px; margin-inline: -3px; padding: 6px; border-radius: 15px; }
  .task-kind-tab { min-height: 42px; font-size: 14px; }
  .task-overall { padding-right: 5px; }
  .task-overall strong { font-size: 14px; }
  .task-overall span { font-size: 9px; }
  .task-owner-card { display: block; scroll-margin-top: 135px; padding: 14px; }
  .task-owner-summary { padding-bottom: 11px; border-bottom: 1px solid #dfe7e1; }
  .task-owner-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px 10px; }
  .task-owner-identity { gap: 9px; }
  .task-owner-name > strong { font-size: 15px; }
  .task-owner-progress strong { font-size: 14px; }
  .task-owner-progress span { font-size: 9px; }
  .task-owner-head-actions { grid-column: 2; grid-row: 1; }
  .task-owner-summary > .task-owner-head > .task-owner-progress { grid-column: 2; grid-row: 1; }
  .task-owner-progress-bar { grid-column: 1 / -1; grid-row: 2; }
  .task-owner-collapse { width: 32px; height: 32px; }
  .task-owner-body { margin-top: 13px; }
  .task-owner-body--account { margin-top: 13px; }
  .task-owner-periods { grid-template-columns: 1fr; gap: 14px; }
  .task-period-section { gap: 9px; padding-top: 11px; border-top: 1px solid #dfe7e1; }
  .task-period-section:first-child { padding-top: 0; border-top: 0; }
  .task-period-heading p { font-size: 9px; }
  .task-period-content { grid-template-columns: 1fr; }
  .task-period-section--daily .task-period-content { display: grid; grid-template-columns: 1fr; }
  .task-period-section--daily .compact-task-list { grid-template-columns: 1fr; }
  .account-task-groups { grid-template-columns: 1fr; }
  .character-task-grid { grid-template-columns: 1fr; }
  .compact-task-row { min-height: 50px; padding-left: 10px; }
  .task-detail-popover { display: none !important; }
  .social-task-kind-panel { margin-top: 11px; padding: 5px; }
  .sheet-board { margin-inline: -3px; padding: 14px 12px 0; }
  .sheet-board-intro { align-items: flex-start; margin-bottom: 11px; }
  .sheet-board-intro h2 { font-size: 17px; }
  .sheet-board-intro p, .sheet-scroll-hint { display: none; }
  .sheet-table-wrap, .social-user-sheet .sheet-table-wrap { max-height: none; margin-inline: -12px; overflow: auto; border-radius: 0 0 var(--radius-lg) var(--radius-lg); scrollbar-gutter: auto; }
  .social-user-sheet .sheet-table-wrap { margin-inline: 0; }
  .sheet-table { --sheet-character: 138px; --sheet-server: 66px; --sheet-job: 86px; --sheet-power: 74px; --sheet-magic: 74px; --sheet-progress: 66px; }
  .sheet-task-head, .sheet-task-cell { width: 82px; min-width: 82px; max-width: 82px; }
  .sheet-category-all-head, .sheet-category-all-cell { width: 44px; min-width: 44px; max-width: 44px; }
  .sheet-row-identity { padding-inline: 7px !important; }
  .sheet-row-identity .avatar { margin-right: 4px; }
  .sheet-row-identity > span:not(.avatar):last-child { max-width: calc(100% - 39px); }
  .sheet-row-identity strong { font-size: 12px; }
  .avatar--sheet, .sheet-account-symbol { width: 30px; height: 30px; border-radius: 9px; }
  .sheet-meta-input { height: 34px; padding-inline: 3px; font-size: 16px; }
  .sheet-header-tooltip { display: none !important; }
  .sheet-board-toolbar { align-items: flex-start; }
  .sheet-board-toolbar p { display: none; }
  .sheet-board-actions .btn { min-height: 34px; padding: 6px 9px; font-size: 10px; }
  .social-user-sheet-head { padding: 8px; }
  .social-user-sheet-toggle { gap: 7px; }
  .avatar--sheet-user { width: 36px; height: 36px; }
  .social-user-sheet-copy small { font-size: 9px; }
  .social-user-sheet-head > .btn { padding-inline: 8px; font-size: 10px; }
  .hero-card { min-height: 0; padding: 23px; }
  .hero-card h1 { font-size: 29px; }
  .hero-progress { justify-content: space-between; }
  .progress-ring { width: 105px; height: 105px; }
  .grid-2, .grid-3, .timer-grid, .form-grid { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-stat { padding: 13px 8px; }
  .summary-stat strong { font-size: 20px; }
  .task-card { grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 15px; }
  .task-control { grid-column: 2; justify-content: flex-start; }
  .task-name { white-space: normal; }
  .task-detail-line { width: 100%; }
  .timer-card { min-height: 190px; }
  .material-row { grid-template-columns: 1fr repeat(3, 64px); gap: 5px; padding: 10px 8px; }
  .material-row strong { font-size: 11px; }
  .material-value { font-size: 11px; }
  .setting-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .setting-row > :last-child { grid-column: 1 / -1; }
  .catalog-row { grid-template-columns: minmax(0, 1fr) auto; }
  .catalog-row > :nth-child(2), .catalog-row > :nth-child(3) { display: none; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 91vh; border-radius: 24px 24px 0 0; padding: 22px 17px calc(22px + env(safe-area-inset-bottom)); }
  .avatar-editor-grid { grid-template-columns: 1fr; }
  .avatar-crop-frame { justify-self: center; width: min(240px, 76vw); }
  .avatar-crop-controls { width: min(360px, 100%); justify-self: center; }
  .toast-region { right: 12px; bottom: calc(78px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
}

@media (max-width: 430px) {
  .hero-progress { align-items: flex-end; }
  .hero-progress > div:last-child { font-size: 11px; }
  .progress-ring { width: 92px; height: 92px; }
  .progress-ring-copy strong { font-size: 23px; }
  .tabs { width: 100%; }
  .tab { min-width: 0; flex: 1; padding-inline: 9px; }
  .material-list { margin-inline: -5px; }
  .material-row { grid-template-columns: minmax(88px, 1fr) repeat(3, 55px); }
}

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

/* Device-local dark theme */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f4f1f8;
  --ink-soft: #d2ccdc;
  --muted: #aaa2b4;
  --paper: #252631;
  --paper-strong: #30313f;
  --canvas: #191a22;
  --mint: #9dd9c8;
  --mint-deep: #8fd6bf;
  --mint-pale: #2f453f;
  --lavender: #c7b7ec;
  --lavender-pale: #3d374b;
  --peach: #efb49f;
  --peach-pale: #493832;
  --butter: #e8d49a;
  --butter-pale: #48422f;
  --rose: #eaa6b5;
  --line: #454554;
  --line-strong: #5b5a6b;
  --shadow: 0 16px 40px rgba(8, 7, 14, .34);
  --shadow-soft: 0 6px 18px rgba(8, 7, 14, .24);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 7% 5%, rgba(239, 180, 159, .12), transparent 25rem),
    radial-gradient(circle at 92% 2%, rgba(199, 183, 236, .16), transparent 27rem),
    radial-gradient(circle at 64% 100%, rgba(157, 217, 200, .09), transparent 30rem),
    var(--canvas);
}

html[data-theme="dark"] .auth-story {
  border-right-color: var(--line);
  background:
    linear-gradient(150deg, rgba(42, 43, 55, .94), rgba(28, 29, 39, .84)),
    radial-gradient(circle at 25% 20%, var(--butter-pale), transparent 45%),
    radial-gradient(circle at 80% 70%, var(--lavender-pale), transparent 48%);
}
html[data-theme="dark"] .feature-pill { border-color: #53786d; background: var(--mint-pale); color: #c6ebe0; }
html[data-theme="dark"] .auth-card { border-color: var(--line-strong); background: rgba(37, 38, 49, .95); }
html[data-theme="dark"] .auth-tabs,
html[data-theme="dark"] .tabs,
html[data-theme="dark"] .segmented,
html[data-theme="dark"] .task-layout-switch { background: #2d2e3a; }
html[data-theme="dark"] .auth-tab.is-active,
html[data-theme="dark"] .tab.is-active,
html[data-theme="dark"] .segmented button.is-active,
html[data-theme="dark"] .task-layout-option.is-active { background: #444557; color: var(--ink); }

html[data-theme="dark"] .input,
html[data-theme="dark"] .select,
html[data-theme="dark"] .textarea { background: #2c2d39; }
html[data-theme="dark"] .input:hover,
html[data-theme="dark"] .select:hover,
html[data-theme="dark"] .textarea:hover { border-color: #757286; }
html[data-theme="dark"] .input:focus,
html[data-theme="dark"] .select:focus,
html[data-theme="dark"] .textarea:focus { background: #373847; }
html[data-theme="dark"] .input::placeholder,
html[data-theme="dark"] .textarea::placeholder { color: #91899c; }

html[data-theme="dark"] .btn { color: #20242d; }
html[data-theme="dark"] .btn--ghost { border-color: var(--line); background: transparent; color: var(--ink-soft); }
html[data-theme="dark"] .btn--soft { border-color: #53786d; background: var(--mint-pale); color: #c6ebe0; }
html[data-theme="dark"] .btn--peach { border-color: #7b5a50; background: var(--peach-pale); color: #f3cec0; }
html[data-theme="dark"] .btn--lavender { border-color: #6c6181; background: var(--lavender-pale); color: #ded2f4; }
html[data-theme="dark"] .btn--danger { border-color: #80515e; background: #50343e; color: #f5bbc5; }
html[data-theme="dark"] .theme-toggle--auth { background: rgba(37, 38, 49, .82); }

html[data-theme="dark"] .sidebar { border-right-color: var(--line); background: rgba(29, 29, 39, .94); }
html[data-theme="dark"] .nav-item:hover { background: #30313e; }
html[data-theme="dark"] .nav-item.is-active { background: linear-gradient(130deg, var(--mint-pale), var(--lavender-pale)); color: #d9f1ea; }
html[data-theme="dark"] .nav-icon { background: rgba(255, 255, 255, .075); }
html[data-theme="dark"] .cost-lock,
html[data-theme="dark"] .cost-proof { border-color: #52746b; background: #2d3d3a; }
html[data-theme="dark"] .cost-lock strong,
html[data-theme="dark"] .cost-proof strong { color: #c2e2d8; }
html[data-theme="dark"] .cost-proof p { color: var(--ink-soft); }
html[data-theme="dark"] .avatar { border-color: #716980; box-shadow: 0 4px 14px rgba(8, 7, 14, .28); color: #ded2f4; }
html[data-theme="dark"] .main-dot { border-color: var(--paper); }
html[data-theme="dark"] .topbar { border-bottom-color: rgba(69, 69, 84, .88); background: rgba(25, 26, 34, .9); }
html[data-theme="dark"] .mobile-nav { border-top-color: var(--line); background: rgba(30, 31, 41, .97); box-shadow: 0 -8px 24px rgba(8, 7, 14, .28); }

html[data-theme="dark"] .card { border-color: var(--line); background: rgba(38, 39, 51, .95); }
html[data-theme="dark"] .hero-card {
  border-color: #5b6372;
  background: linear-gradient(128deg, rgba(48, 62, 59, .96), rgba(47, 40, 61, .92)), var(--paper);
}
html[data-theme="dark"] .hero-card::after { color: rgba(215, 203, 244, .5); }
html[data-theme="dark"] .progress-ring { background: conic-gradient(var(--mint-deep) calc(var(--progress) * 1%), #414250 0); }
html[data-theme="dark"] .mini-progress { background: #414250; }
html[data-theme="dark"] .badge,
html[data-theme="dark"] .meta-pill { background: #30313d; }
html[data-theme="dark"] .badge--mint { border-color: #53786d; background: var(--mint-pale); color: #c6ebe0; }
html[data-theme="dark"] .badge--lavender { border-color: #6c6181; background: var(--lavender-pale); color: #ded2f4; }
html[data-theme="dark"] .badge--peach { border-color: #7b5a50; background: var(--peach-pale); color: #f3cec0; }
html[data-theme="dark"] .badge--butter { border-color: #766c4d; background: var(--butter-pale); color: #f1e4b8; }
html[data-theme="dark"] .badge--danger { border-color: #80515e; background: #50343e; color: #f5bbc5; }
html[data-theme="dark"] .summary-stat { background: var(--paper); }
html[data-theme="dark"] .chip { background: rgba(48, 49, 61, .84); }
html[data-theme="dark"] .chip.is-active { border-color: #53786d; background: var(--mint-pale); color: #c6ebe0; }

html[data-theme="dark"] .task-card,
html[data-theme="dark"] .compact-task-row { border-color: var(--line); background: #292a36; box-shadow: 0 3px 12px rgba(8, 7, 14, .2); }
html[data-theme="dark"] .task-card:hover,
html[data-theme="dark"] .compact-task-row:hover { border-color: #707083; }
html[data-theme="dark"] .task-card.is-complete,
html[data-theme="dark"] .compact-task-row.is-complete { border-color: #557a70; background: #2d403c; }
html[data-theme="dark"] .task-card.is-complete .task-name,
html[data-theme="dark"] .compact-task-row.is-complete .compact-task-name { color: #b8b5c0; text-decoration-color: #80ae9f; }
html[data-theme="dark"] .task-check,
html[data-theme="dark"] .count-control,
html[data-theme="dark"] .task-owner-collapse,
html[data-theme="dark"] .social-user-sheet-chevron { border-color: var(--line-strong); background: #31323f; color: var(--ink); }
html[data-theme="dark"] .task-name,
html[data-theme="dark"] .task-facts strong,
html[data-theme="dark"] .exchange-item,
html[data-theme="dark"] .exchange-item b,
html[data-theme="dark"] .compact-task-name,
html[data-theme="dark"] .task-owner-name > strong,
html[data-theme="dark"] .task-owner-progress strong,
html[data-theme="dark"] .task-overall strong { color: var(--ink); }
html[data-theme="dark"] .task-detail-line { border-color: var(--line); background: #30313d; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045); }
html[data-theme="dark"] .task-facts small { color: #d2c6ef; }
html[data-theme="dark"] .count-control button,
html[data-theme="dark"] .sheet-count-control button { background: #3b3c4b; color: var(--ink); }
html[data-theme="dark"] .count-control strong { color: var(--ink); }
html[data-theme="dark"] .task-allowance { border-color: #5a7f75; color: #c8d9d4; }
html[data-theme="dark"] .task-allowance strong { color: #c8eee3; }
html[data-theme="dark"] .exchange-flow small { color: #edda9c; }
html[data-theme="dark"] .exchange-box--received small,
html[data-theme="dark"] .fixed-target { color: #bce8da; }
html[data-theme="dark"] .exchange-arrow { color: #b5decf; }

html[data-theme="dark"] .task-filter-panel,
html[data-theme="dark"] .social-task-kind-panel { border-color: var(--line); background: rgba(31, 32, 42, .96); box-shadow: 0 7px 22px rgba(8, 7, 14, .24); }
html[data-theme="dark"] .task-kind-tab { border-color: var(--line); background: rgba(48, 49, 61, .82); color: var(--ink-soft); }
html[data-theme="dark"] .task-kind-tab--combat.is-active { border-color: #7b5a50; background: var(--peach-pale); color: #f3cec0; }
html[data-theme="dark"] .task-kind-tab--life.is-active { border-color: #53786d; background: var(--mint-pale); color: #c6ebe0; }
html[data-theme="dark"] .task-owner-card--account { border-color: #685e81; background: linear-gradient(140deg, #292a36, #3e354e); }
html[data-theme="dark"] .task-owner-card--main { border-color: #766f50; }
html[data-theme="dark"] .task-owner-summary,
html[data-theme="dark"] .task-period-section + .task-period-section { border-color: var(--line); }
html[data-theme="dark"] .task-owner-symbol { color: #ded2f4; }
html[data-theme="dark"] .task-owner-identity p,
html[data-theme="dark"] .task-owner-progress span,
html[data-theme="dark"] .task-period-heading p { color: var(--muted); }
html[data-theme="dark"] .task-period-heading h3 { color: var(--ink); }
html[data-theme="dark"] .task-period-icon { background: var(--mint-pale); color: #c6ebe0; }
html[data-theme="dark"] .task-period-section--weekly .task-period-icon { background: var(--lavender-pale); color: #ded2f4; }
html[data-theme="dark"] .task-period-section--weekend .task-period-icon { background: var(--butter-pale); color: #f1e4b8; }
html[data-theme="dark"] .task-period-progress { background: var(--mint-pale); color: #c6ebe0; }
html[data-theme="dark"] .task-period-section--weekly .task-period-progress { background: var(--lavender-pale); color: #ded2f4; }
html[data-theme="dark"] .task-period-section--weekend .task-period-progress { background: var(--butter-pale); color: #f1e4b8; }
html[data-theme="dark"] .account-task-groups .task-category-group { background: rgba(60, 53, 79, .58); }
html[data-theme="dark"] .task-category-title { color: var(--ink-soft); }
html[data-theme="dark"] .task-category-title::after { background: var(--line); }
html[data-theme="dark"] .task-category-count { background: #343541; color: var(--ink-soft); }
html[data-theme="dark"] .task-category-toggle { border-color: var(--line-strong); background: #30313d; color: var(--ink-soft); }
html[data-theme="dark"] .task-category-toggle:hover { border-color: #6d8e84; background: #36413f; }
html[data-theme="dark"] .task-category-toggle-box { border-color: #777383; background: #343541; }
html[data-theme="dark"] .task-category-toggle.is-complete { border-color: #53786d; background: var(--mint-pale); color: #c6ebe0; }
html[data-theme="dark"] .task-category-toggle.is-complete .task-category-toggle-box { border-color: var(--mint); background: var(--mint); color: #20242d; }
html[data-theme="dark"] .task-category-toggle.is-partial { border-color: #766c4d; background: var(--butter-pale); color: #f1e4b8; }
html[data-theme="dark"] .task-category-toggle.is-partial .task-category-toggle-box { border-color: #c7a85a; background: #8d7335; color: #fff3cd; }
html[data-theme="dark"] .task-info-button { border-color: var(--line-strong); background: #333440; color: #d4cfdd; }
html[data-theme="dark"] .task-detail-popover,
html[data-theme="dark"] .sheet-header-tooltip { border-color: var(--line-strong); background: rgba(37, 38, 49, .99); box-shadow: 0 16px 38px rgba(8, 7, 14, .42); }
html[data-theme="dark"] .task-detail-popover::before,
html[data-theme="dark"] .sheet-header-tooltip::before { border-color: var(--line-strong); background: var(--paper); }
html[data-theme="dark"] .task-detail-popover-title,
html[data-theme="dark"] .sheet-header-tooltip > strong { color: var(--ink); }
html[data-theme="dark"] .settings-period-section > header { background: var(--mint-pale); }
html[data-theme="dark"] .settings-period-section--weekly > header { background: var(--lavender-pale); }
html[data-theme="dark"] .settings-period-section--weekend > header { background: var(--butter-pale); }
html[data-theme="dark"] .settings-period-section > header strong { color: var(--ink); }
html[data-theme="dark"] .settings-period-section > header small { color: var(--ink-soft); }
html[data-theme="dark"] .settings-period-section > header em { background: rgba(255, 255, 255, .08); color: var(--ink-soft); }

html[data-theme="dark"] .sheet-table-wrap { border-top-color: var(--line-strong); }
html[data-theme="dark"] .sheet-table { color: var(--ink-soft); }
html[data-theme="dark"] .sheet-table th,
html[data-theme="dark"] .sheet-table td { border-color: #4a4958; }
html[data-theme="dark"] .sheet-table thead th { color: var(--ink-soft); }
html[data-theme="dark"] .sheet-static-head { background: #343541; }
html[data-theme="dark"] .sheet-period-head--daily { background: var(--mint-pale); color: #c6ebe0 !important; }
html[data-theme="dark"] .sheet-period-head--weekly { background: var(--lavender-pale); color: #ded2f4 !important; }
html[data-theme="dark"] .sheet-period-head--weekend { background: var(--butter-pale); color: #f1e4b8 !important; }
html[data-theme="dark"] .sheet-category-row th { background: #30313d; color: var(--ink-soft); }
html[data-theme="dark"] .sheet-task-row th,
html[data-theme="dark"] .sheet-table tbody tr > * { background: #242530; }
html[data-theme="dark"] .sheet-category-all-head { background: #363742 !important; color: var(--ink-soft) !important; }
html[data-theme="dark"] .sheet-task-head > button,
html[data-theme="dark"] .sheet-row-identity strong,
html[data-theme="dark"] .social-user-sheet-copy strong { color: var(--ink); }
html[data-theme="dark"] .sheet-header-tooltip > span,
html[data-theme="dark"] .sheet-board-intro p,
html[data-theme="dark"] .sheet-scroll-hint,
html[data-theme="dark"] .sheet-board-toolbar p { color: var(--muted); }
html[data-theme="dark"] .sheet-board-intro h2 { color: var(--ink); }
html[data-theme="dark"] .sheet-table tbody tr:hover > * { background: #2e2f3c; }
html[data-theme="dark"] .sheet-table tbody .sheet-account-row > * { background: var(--lavender-pale); color: var(--ink-soft); }
html[data-theme="dark"] .sheet-table tbody .sheet-account-row:hover > * { background: #484057; }
html[data-theme="dark"] .sheet-table tbody .sheet-main-row > * { background: var(--butter-pale); color: var(--ink-soft); }
html[data-theme="dark"] .sheet-table tbody .sheet-main-row:hover > * { background: #524b36; }
html[data-theme="dark"] .sheet-account-symbol { background: #514666; color: #e5d9f7; }
html[data-theme="dark"] .sheet-account-row .sheet-row-identity strong,
html[data-theme="dark"] .sheet-account-row .sheet-col-server,
html[data-theme="dark"] .sheet-account-row .sheet-col-job,
html[data-theme="dark"] .sheet-account-row .sheet-col-power,
html[data-theme="dark"] .sheet-account-row .sheet-col-magic,
html[data-theme="dark"] .sheet-account-row .sheet-col-progress,
html[data-theme="dark"] .sheet-main-row .sheet-row-identity strong,
html[data-theme="dark"] .sheet-main-row .sheet-col-server,
html[data-theme="dark"] .sheet-main-row .sheet-col-job,
html[data-theme="dark"] .sheet-main-row .sheet-col-power,
html[data-theme="dark"] .sheet-main-row .sheet-col-magic,
html[data-theme="dark"] .sheet-main-row .sheet-col-progress { color: var(--ink-soft); }
html[data-theme="dark"] .sheet-account-row .sheet-meta-input,
html[data-theme="dark"] .sheet-main-row .sheet-meta-input { color: var(--ink); }
html[data-theme="dark"] .sheet-account-row .sheet-col-progress strong,
html[data-theme="dark"] .sheet-main-row .sheet-col-progress strong { color: #c6ebe0; }
html[data-theme="dark"] .sheet-col-server,
html[data-theme="dark"] .sheet-col-job,
html[data-theme="dark"] .sheet-col-power,
html[data-theme="dark"] .sheet-col-magic,
html[data-theme="dark"] .sheet-col-progress { color: var(--ink-soft); }
html[data-theme="dark"] .sheet-meta-input { color: var(--ink); }
html[data-theme="dark"] .sheet-meta-input:hover { border-color: #767287; background: rgba(255, 255, 255, .065); }
html[data-theme="dark"] .sheet-meta-input:focus { border-color: var(--mint-deep); background: #373847; }
html[data-theme="dark"] .sheet-meta-input.is-saved { border-color: #53786d; background: var(--mint-pale); color: #c6ebe0; }
html[data-theme="dark"] .sheet-col-progress strong { color: #c3eadf; }
html[data-theme="dark"] .sheet-table tbody .sheet-task-cell.is-complete { background: var(--mint-pale); color: #c6ebe0; }
html[data-theme="dark"] .sheet-table tbody .sheet-task-cell.is-unavailable { background: #2a2b34; color: #7e7887; }
html[data-theme="dark"] .sheet-table tbody .sheet-category-all-cell.is-complete { background: var(--mint-pale); }
html[data-theme="dark"] .sheet-table tbody .sheet-category-all-cell.is-partial { background: var(--butter-pale); }
html[data-theme="dark"] .sheet-table tbody .sheet-category-all-cell.is-unavailable { background: #2a2b34; color: #7e7887; }
html[data-theme="dark"] .sheet-category-all-toggle { background: transparent; }
html[data-theme="dark"] .sheet-task-toggle span,
html[data-theme="dark"] .sheet-readonly-check { border-color: #777383; background: #343541; color: #343541; }
html[data-theme="dark"] .is-complete .sheet-task-toggle span,
html[data-theme="dark"] .is-complete .sheet-readonly-check { border-color: var(--mint); background: var(--mint); color: #20242d; }
html[data-theme="dark"] .sheet-difficulty { border-color: var(--line-strong); background: #30313d; color: var(--ink-soft); }
html[data-theme="dark"] .sheet-readonly-count { color: #c6e8dd; }
html[data-theme="dark"] .sheet-readonly-difficulty { color: var(--muted); }
html[data-theme="dark"] .social-user-sheet-head { background: linear-gradient(120deg, #303b3a, #403750); }

html[data-theme="dark"] .empty-state { background: rgba(55, 55, 70, .54); }
html[data-theme="dark"] .timeline-step { background: rgba(255, 255, 255, .075); }
html[data-theme="dark"] .guild-banner {
  border-color: color-mix(in srgb, var(--guild-color, #91cdbb) 40%, #565567);
  background: linear-gradient(125deg, color-mix(in srgb, var(--guild-color, #91cdbb) 22%, #30313f), #292a36);
  color: var(--ink);
}
html[data-theme="dark"] .guild-banner p { color: var(--ink-soft); }
html[data-theme="dark"] .guild-crest { border-color: rgba(255, 255, 255, .26); }
html[data-theme="dark"] .ship-summary { background: linear-gradient(120deg, var(--butter-pale), var(--peach-pale)); color: var(--ink); }
html[data-theme="dark"] .ship-summary .ship-stage strong { color: var(--ink); }
html[data-theme="dark"] .ship-summary .ship-stage span { color: var(--ink-soft); }
html[data-theme="dark"] .material-row { background: #30313c; }
html[data-theme="dark"] .catalog-row,
html[data-theme="dark"] .setting-row { background: var(--paper); }
html[data-theme="dark"] .setting-row.is-hidden { background: #2a2b34; }
html[data-theme="dark"] .modal-backdrop { background: rgba(11, 9, 17, .7); }
html[data-theme="dark"] .modal { border-color: var(--line-strong); box-shadow: 0 26px 72px rgba(8, 7, 14, .52); }
html[data-theme="dark"] .modal-close { background: #343541; }
html[data-theme="dark"] .avatar-editor { background: linear-gradient(145deg, rgba(48, 73, 65, .84), rgba(60, 53, 79, .82)); }
html[data-theme="dark"] .avatar-crop-frame { border-color: #716d80; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
html[data-theme="dark"] .avatar-crop-frame::after { border-color: rgba(255, 255, 255, .34); box-shadow: 0 0 0 999px rgba(0, 0, 0, .08); }
html[data-theme="dark"] .avatar-crop-placeholder strong { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .07); }
html[data-theme="dark"] .toast { background: rgba(37, 38, 49, .98); }
html[data-theme="dark"] .loading-overlay { background: rgba(25, 26, 34, .76); }
html[data-theme="dark"] .spinner { border-color: #4c4c5c; border-top-color: var(--mint-deep); }
html[data-theme="dark"] .empty-state-icon { color: #ded2f4; }
html[data-theme="dark"] .weekend-closed { border-color: #746b4d; color: #eddfa9; }
