:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --panel: #ffffff;
  --text: #202124;
  --muted: #6b7280;
  --line: #d9dee5;
  --accent: #176b87;
  --accent-dark: #0f5268;
  --warm: #a85f1c;
  --warm-soft: #fff4e8;
  --ink-soft: #eef1f4;
  --danger: #b42318;
  --success: #146c43;
  --soft: #eef6f8;
  --handwriting: "Klee One", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

.app-header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: flex;
  gap: 10px;
}

.brand-mark {
  border-radius: 6px;
  display: block;
  height: 36px;
  object-fit: cover;
  width: 36px;
}

.brand small {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav a,
.nav-button {
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  padding: 7px 10px;
}

.nav a:hover,
.nav-button:hover {
  border-color: var(--line);
  color: var(--text);
}

.nav a.active,
.nav-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.quota-pill {
  align-items: center;
  background: var(--soft);
  border: 1px solid #b8dce6;
  border-radius: 999px;
  color: var(--accent-dark);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
}

a.quota-pill:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.quota-pill small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.quota-pill.warning {
  background: #fff4d6;
  border-color: #f2b84b;
  color: #8a4f00;
}

.quota-pill.critical {
  background: #fff0ee;
  border-color: #f2a29a;
  color: var(--danger);
}

.plan-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.plan-hero {
  align-items: center;
  border-color: #b8dce6;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.plan-hero h2 {
  font-size: 26px;
  margin: 8px 0 2px;
}

.plan-hero p {
  color: var(--muted);
  margin: 0;
}

.plan-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-pricing-grid {
  margin-bottom: 18px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.plan-card.active-plan {
  border-color: var(--accent);
}

.plan-card-head {
  display: grid;
  gap: 7px;
}

.plan-price {
  color: var(--accent-dark);
  font-size: 24px;
  font-weight: 900;
  margin: 0;
}

.plan-copy {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  min-height: 42px;
}

.topup-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
}

.topup-status,
.topup-option {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.topup-option {
  align-content: space-between;
}

.topup-meter {
  background: var(--ink-soft);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.topup-meter span {
  background: var(--accent);
  display: block;
  height: 100%;
  max-width: 100%;
}

.topup-note {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.plan-comparison {
  margin-top: 4px;
}

.comparison-table-wrap {
  overflow-x: auto;
}

.comparison-table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

.comparison-table th,
.comparison-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

.comparison-table thead th {
  color: var(--accent-dark);
  font-size: 13px;
}

.comparison-table tbody th {
  color: var(--text);
  font-size: 13px;
  width: 150px;
}

.comparison-table td {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dummy-ad {
  align-items: center;
  background: #f7f3e8;
  border: 1px dashed #c9a95e;
  border-radius: 8px;
  color: #6f5211;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 16px;
  padding: 10px 12px;
}

.dummy-ad span {
  background: #6f5211;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 4px 6px;
}

.dummy-ad strong {
  font-size: 14px;
}

.dummy-ad small {
  color: #7c6a3a;
  font-size: 12px;
}

.error-body {
  align-items: center;
  background:
    linear-gradient(180deg, #f7fbfc 0%, #eef6f8 100%);
  display: flex;
  min-height: 100vh;
  padding: 24px;
}

.error-shell {
  margin: 0 auto;
  max-width: 560px;
  width: 100%;
}

.error-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(32, 33, 36, 0.08);
  display: grid;
  gap: 12px;
  padding: 28px;
}

.error-card h1 {
  font-size: 30px;
}

.logout-form {
  margin: 0;
}

.nav-button {
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.layout {
  margin: 0 auto;
  max-width: 1180px;
  padding: 30px 28px 44px;
}

.page-head,
.section-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.25;
  margin-bottom: 0;
}

h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.lead {
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 720px;
}

.greeting {
  color: var(--warm);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
}

.dashboard-grid,
.detail-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-grid {
  align-items: start;
}

.metric-card {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
}

.metric-card strong {
  font-size: 24px;
  line-height: 1.2;
}

.compact-dashboard {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0;
}

.panel,
.form-card,
.list-item,
.compact-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel,
.form-card {
  padding: 20px;
}

.panel-priority {
  border-color: #b8dce6;
  grid-row: span 2;
  min-height: 100%;
}

.panel-priority h2 {
  font-size: 22px;
}

.quick-capture {
  border-color: #b8dce6;
  margin-bottom: 18px;
}

.notebook-greeting {
  color: var(--warm);
  font-size: 13px;
  font-weight: 800;
  grid-column: 1 / -1;
  margin: 0;
}

.notebook-summary {
  background: var(--soft);
  border-radius: 8px;
  color: var(--muted);
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
}

.notebook-summary strong {
  color: var(--accent-dark);
  display: block;
  margin-bottom: 2px;
}

.notebook-summary span {
  display: block;
  font-size: 13px;
}

.notebook-page {
  background:
    linear-gradient(90deg, rgba(168, 95, 28, 0.22) 0 2px, transparent 2px 100%),
    repeating-linear-gradient(
      #fffdf8 0,
      #fffdf8 31px,
      rgba(23, 107, 135, 0.08) 32px
    );
  border: 1px solid #e2d8c9;
  border-radius: 8px;
  box-shadow: inset 10px 0 0 rgba(168, 95, 28, 0.07);
  color: #283238;
  padding: 14px 14px 14px 22px;
}

.notebook-standalone-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 280px;
}

.notebook-page-full {
  margin: 0 auto;
  max-width: 760px;
  min-height: 520px;
  padding: 22px 22px 22px 34px;
  width: 100%;
}

.notebook-page-full .notebook-page-head strong {
  font-size: 30px;
}

.notebook-page-full .notebook-observation p {
  font-size: 16px;
}

.notebook-date-panel {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 88px;
}

.notebook-date-form {
  display: grid;
  gap: 10px;
}

.notebook-side-links {
  display: grid;
  gap: 8px;
}

.notebook-side-links a {
  border-bottom: 1px solid var(--line);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 850;
  padding: 7px 0;
}

.notebook-page-head {
  align-items: end;
  border-bottom: 2px solid rgba(23, 107, 135, 0.16);
  display: grid;
  gap: 1px;
  grid-template-columns: 1fr auto;
  padding-bottom: 10px;
}

.notebook-page-head span {
  color: var(--warm);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

.notebook-page-head strong {
  color: var(--accent-dark);
  font-family: var(--handwriting);
  font-size: 23px;
  font-weight: 600;
  grid-row: span 2;
  line-height: 1.1;
  text-align: right;
}

.notebook-page-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.notebook-observation {
  border-bottom: 1px dashed rgba(23, 107, 135, 0.24);
  display: grid;
  gap: 5px;
  padding: 2px 0 11px;
}

.notebook-observation h2,
.notebook-section h2 {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 850;
  margin: 0;
}

.notebook-observation p {
  font-family: var(--handwriting);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
  margin: 0;
}

.notebook-section {
  border-bottom: 1px dashed rgba(23, 107, 135, 0.18);
  display: grid;
  gap: 8px;
  padding: 2px 0 11px;
}

.notebook-section h2 {
  align-items: center;
  display: flex;
  gap: 7px;
  margin-bottom: 0;
}

.notebook-section-count {
  background: rgba(23, 107, 135, 0.1);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  padding: 4px 7px;
}

.notebook-focus {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 107, 135, 0.14);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  display: block;
  padding: 10px;
}

.notebook-focus strong {
  color: var(--accent-dark);
  display: block;
  line-height: 1.4;
  margin-bottom: 4px;
}

.notebook-focus span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.notebook-priority-list {
  counter-reset: notebook-step;
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.notebook-priority-list li {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(23, 107, 135, 0.13);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 9px 10px 9px 36px;
  position: relative;
}

.notebook-priority-list li::before {
  align-items: center;
  background: var(--accent);
  border-radius: 999px;
  color: #fff;
  content: counter(notebook-step);
  counter-increment: notebook-step;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  height: 20px;
  justify-content: center;
  left: 9px;
  position: absolute;
  top: 10px;
  width: 20px;
}

.notebook-priority-list span {
  color: var(--warm);
  font-size: 11px;
  font-weight: 850;
}

.notebook-priority-list a {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.notebook-priority-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-brief-list li {
  background: #fff;
  padding: 8px 9px;
}

.notebook-line-list {
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.notebook-line-list li {
  background: rgba(255, 255, 255, 0.56);
  border-left: 3px solid rgba(168, 95, 28, 0.28);
  border-radius: 6px;
  display: grid;
  gap: 2px;
  padding: 8px 9px;
}

.notebook-line-list a {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.notebook-line-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.notebook-handover .notebook-line-list li {
  border-left-color: rgba(180, 35, 24, 0.34);
}

.notebook-premium-proactive {
  background: rgba(168, 95, 28, 0.07);
  border: 1px solid rgba(168, 95, 28, 0.16);
  border-radius: 8px;
  padding: 10px;
}

.notebook-premium-proactive h2 {
  color: #7a4d1b;
}

.notebook-premium-proactive .notebook-section-count {
  background: rgba(168, 95, 28, 0.14);
  color: #7a4d1b;
}

.notebook-premium-proactive .notebook-line-list li {
  border-left-color: rgba(168, 95, 28, 0.5);
}

.notebook-done .notebook-line-list li {
  border-left-color: rgba(20, 108, 67, 0.34);
}

.notebook-done .notebook-line-list a::before {
  color: var(--success);
  content: "✓ ";
}

.notebook-sticky-note {
  background: #fff1a8;
  border: 1px solid #e8d276;
  border-radius: 7px;
  box-shadow: 0 10px 20px rgba(97, 72, 20, 0.11);
  color: #4b421e;
  display: grid;
  font-family: var(--handwriting);
  gap: 5px;
  justify-self: start;
  max-width: 92%;
  padding: 11px 12px;
  transform: rotate(-0.8deg);
}

.notebook-sticky-note strong {
  font-size: 13px;
  font-weight: 600;
}

.notebook-sticky-note p {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
  margin: 0;
}

.notebook-sticky-note a {
  color: #6a4d00;
  font-size: 12px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notebook-more {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  margin: -2px 0 0;
}

.notebook-page-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding-top: 2px;
}

.notebook-page-foot a {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(23, 107, 135, 0.15);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 850;
  padding: 7px 10px;
}

.notebook-stats {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.notebook-stats a {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 9px 10px;
}

.notebook-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.notebook-stats strong {
  color: var(--accent-dark);
  font-size: 18px;
  line-height: 1;
}

.usage-strip {
  align-items: center;
  background: #fff;
  border: 1px solid #b8dce6;
  border-radius: 8px;
  color: var(--accent-dark);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.usage-strip div {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.usage-strip strong {
  font-size: 14px;
}

.usage-strip span {
  color: var(--muted);
  font-size: 13px;
}

.usage-strip.limited {
  background: #fff8f8;
  border-color: #f3b6b0;
  color: var(--danger);
}

.usage-summary-grid,
.onboarding-steps {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.usage-summary-card,
.onboarding-step {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.usage-summary-card span,
.onboarding-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.usage-summary-card strong,
.onboarding-step strong {
  color: var(--accent-dark);
  font-size: 20px;
  line-height: 1.15;
}

.usage-summary-card small,
.onboarding-step small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.usage-summary-card.limited {
  background: #fff8f8;
  border-color: #f3b6b0;
}

.usage-summary-card.limited strong {
  color: var(--danger);
}

.standard-onboarding {
  border-color: #b8dce6;
  margin-bottom: 18px;
}

.onboarding-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}

.onboarding-step {
  color: var(--text);
}

.onboarding-step:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 22px rgba(23, 107, 135, 0.08);
}

.onboarding-step.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.onboarding-step.done .onboarding-status {
  color: #166534;
}

.review-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.review-summary-card {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.review-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.review-summary-card strong {
  color: var(--accent-dark);
  font-size: 24px;
  line-height: 1.1;
}

.review-summary-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.review-flow {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr);
  margin-bottom: 16px;
}

.review-flow h2 {
  font-size: 18px;
  margin-bottom: 6px;
}

.review-flow p {
  color: var(--muted);
  margin: 0;
}

.review-flow ol {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-dark);
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  margin: 0;
  padding: 12px 12px 12px 30px;
}

.review-next-step {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.review-next-main {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.review-next-main h2 {
  font-size: 19px;
  margin-bottom: 6px;
}

.review-next-main p {
  color: var(--muted);
  margin: 0;
}

.review-step-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-step-grid article {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 11px 12px;
}

.review-step-grid span {
  align-items: center;
  background: var(--accent);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.review-step-grid strong {
  color: var(--accent-dark);
  font-size: 13px;
}

.review-step-grid p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.date-role-compact,
.manual-date-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-guidance-preference {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: flex-end;
  padding-top: 12px;
}

.review-guidance-preference .checkline {
  color: var(--muted);
  font-size: 13px;
  margin-right: auto;
}

.date-role-compact span,
.manual-date-guide span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  padding: 7px 10px;
}

.date-role-compact strong,
.manual-date-guide strong {
  color: var(--accent-dark);
  margin-right: 6px;
}

.date-role-guide {
  background: #fbfcfd;
  margin-bottom: 16px;
}

.date-role-guide h2 {
  font-size: 17px;
  margin-bottom: 10px;
}

.date-role-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.date-role-grid div {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.date-role-grid strong {
  color: var(--accent-dark);
}

.date-role-grid p {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.candidate-guidance {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.candidate-guidance summary {
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.candidate-guidance p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 8px 0 0;
}

.candidate-guidance strong {
  color: var(--accent-dark);
  display: inline-block;
  margin-right: 8px;
}

.secretary-brief {
  align-items: start;
  background: #fbfcfd;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1.05fr);
  margin-bottom: 18px;
  padding: 16px;
}

.brief-copy h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.brief-copy p {
  color: var(--muted);
  margin-bottom: 12px;
}

.brief-guidance {
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.brief-subsection h3 {
  color: var(--accent-dark);
  font-size: 15px;
  margin-bottom: 10px;
}

.brief-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.brief-list li {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.brief-list a {
  color: var(--accent-dark);
  display: inline-block;
  font-weight: 800;
  margin-bottom: 4px;
}

.brief-list span,
.brief-empty {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin: 0;
}

.quick-form textarea {
  min-height: 140px;
}

.body-first span {
  color: var(--accent-dark);
  font-size: 14px;
}

.optional-field {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 14px;
  padding: 10px 12px 0;
}

.optional-field summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.task-due-picker .field-grid {
  margin-bottom: 8px;
}

.task-due-picker .field-hint {
  display: block;
  margin-bottom: 10px;
}

.task-due-picker-intro {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
}

.task-due-picker .manual-date-guide {
  margin: -2px 0 10px;
}

.capture-actions {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 8px;
}

.capture-main-action {
  font-size: 16px;
  justify-content: center;
  min-height: 46px;
}

.manual-capture-actions {
  margin-top: 4px;
}

.form-sub-actions {
  font-size: 13px;
  margin: -2px 0 12px;
}

.form-sub-actions a {
  color: var(--muted);
  font-weight: 700;
}

.list {
  display: grid;
  gap: 12px;
}

.list-item,
.compact-card {
  padding: 14px;
}

.list-item {
  align-items: flex-start;
  display: flex;
  gap: 12px;
}

.list-item > div {
  min-width: 0;
}

.memo-filter-tabs {
  margin-bottom: 12px;
}

.memo-list {
  display: grid;
  gap: 8px;
}

.memo-list-item {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  padding: 11px 12px;
}

.memo-list-select {
  margin-top: 2px;
}

.memo-list-main {
  color: inherit;
  display: grid;
  flex: 1 1 auto;
  gap: 5px;
  min-width: 0;
  text-decoration: none;
}

.memo-list-title-row {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.memo-list-title-row strong {
  color: var(--accent-dark);
  font-size: 15px;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.memo-list-preview {
  color: var(--text);
  display: -webkit-box;
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.memo-list-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 5px;
}

.memo-list-meta span,
.memo-state {
  background: var(--soft);
  border-radius: 999px;
  display: inline-flex;
  font-weight: 700;
  line-height: 1.2;
  padding: 3px 8px;
}

.memo-state {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 12px;
}

.memo-state.pending {
  background: #fff5db;
  color: #92400e;
}

.memo-state.organized,
.memo-task-done {
  background: #eaf7f0;
  color: var(--success);
}

.memo-state.note {
  background: #f2f5f6;
  color: var(--muted);
}

.compact-card + .compact-card {
  margin-top: 10px;
}

.compact-card.task {
  border-left: 5px solid var(--line);
}

.compact-card.task.high {
  border-left-color: #c2410c;
}

.compact-card.task.medium {
  border-left-color: #b7791f;
}

.compact-card.task.low {
  border-left-color: #2f855a;
}

.task-row {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

.task-row .item-title {
  flex: 1 1 auto;
  min-width: 0;
}

.task-row.compact {
  align-items: center;
}

.task-simple-card {
  padding: 11px 12px;
}

.task-summary-link {
  color: var(--text);
  display: grid;
  flex: 1 1 auto;
  gap: 5px;
  min-width: 0;
  text-decoration: none;
}

.task-summary-link strong {
  color: var(--accent-dark);
  font-size: 15px;
  line-height: 1.35;
}

.task-summary-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 5px;
}

.task-summary-meta span {
  background: var(--soft);
  border-radius: 999px;
  padding: 2px 7px;
}

.task-detail-edit {
  margin-bottom: 16px;
}

.task-detail-secondary {
  margin-bottom: 16px;
}

.memo-detail-edit {
  margin-bottom: 16px;
}

.memo-detail-secondary {
  margin-bottom: 16px;
}

.inline-form {
  margin: 0;
}

.admin-search-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-search-form input {
  flex: 1 1 260px;
  margin: 0;
}

.admin-filter-form {
  align-items: end;
  margin-bottom: 0;
}

.admin-filter-form label {
  flex: 1 1 180px;
  margin: 0;
  min-width: 160px;
}

.admin-filter-form label:first-child {
  flex-basis: 260px;
}

.admin-filter-form select,
.admin-filter-form input {
  min-height: 38px;
  width: 100%;
}

.admin-list-filter {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 16px;
}

.admin-list-summary {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px;
  justify-content: space-between;
  margin: 12px 0 8px;
}

.admin-pagination {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.button.disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.task-complete-form {
  flex: 0 0 auto;
}

.task-quick-edit {
  align-items: end;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 0.7fr) minmax(120px, 0.5fr) auto;
  margin-top: 12px;
  padding-top: 12px;
}

.task-quick-edit label {
  margin-bottom: 0;
}

.task-quick-edit input,
.task-quick-edit select {
  min-height: 34px;
  padding: 6px 8px;
}

.select-toggle,
.selection-check {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  height: 26px;
  justify-content: center;
  margin-top: 1px;
  width: 26px;
}

.select-toggle span,
.selection-check span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: block;
  height: 18px;
  width: 18px;
}

.select-toggle:hover span {
  background: var(--soft);
  border-color: var(--accent);
}

.selection-check {
  cursor: pointer;
  position: relative;
}

.selection-check input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.selection-check input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.selection-check input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  position: relative;
}

.selection-check input:checked + span::after {
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
  height: 9px;
  left: 6px;
  position: absolute;
  top: 2px;
  transform: rotate(45deg);
  width: 4px;
}

.bulk-form {
  display: block;
}

.bulk-toolbar[hidden] {
  display: none;
}

.bulk-toolbar {
  align-items: center;
  background: #fff;
  border: 1px solid #b8dce6;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 14px;
}

.bulk-toolbar strong {
  color: var(--accent-dark);
}

.bulk-toolbar p {
  color: var(--muted);
  margin: 2px 0 0;
}

.bulk-toolbar-main {
  flex: 1 1 320px;
  min-width: 0;
  width: 100%;
}

.bulk-task-options {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.bulk-task-option {
  align-items: flex-start;
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-sizing: border-box;
  color: var(--text);
  cursor: pointer;
  display: grid;
  flex: 1 1 180px;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
  margin: 0;
  padding: 7px 10px;
  text-align: left;
  white-space: normal;
  writing-mode: horizontal-tb;
}

.bulk-task-option input {
  margin-top: 2px;
}

.bulk-task-option span {
  display: grid;
  line-height: 1.4;
  min-width: 0;
  white-space: normal;
  word-break: normal;
  writing-mode: horizontal-tb;
}

.bulk-task-option strong {
  color: var(--text);
  font-size: 13px;
}

.bulk-task-option small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.check-btn {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
  width: 26px;
}

.check-btn:hover {
  background: #eaf7f0;
  border-color: var(--success);
}

.check-circle {
  border: 2px solid var(--muted);
  border-radius: 999px;
  display: block;
  height: 12px;
  width: 12px;
}

.check-btn:hover .check-circle {
  border-color: var(--success);
}

.item-title {
  color: var(--accent-dark);
  display: inline-block;
  font-weight: 700;
  margin-bottom: 4px;
}

.meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px;
}

.meta span {
  background: var(--soft);
  border-radius: 999px;
  padding: 2px 8px;
}

.status-badge {
  background: var(--soft);
  border-radius: 999px;
  color: var(--accent-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 9px;
}

.status-todo {
  background: #f2f5f6;
  color: var(--muted);
}

.status-in_progress {
  background: #e8f1fb;
  color: #2563eb;
}

.status-done {
  background: #eaf7f0;
  color: var(--success);
}

.status-hold {
  background: #fff5db;
  color: #92400e;
}

.status-deleted {
  background: #fdecec;
  color: var(--danger);
}

.meta .status-badge {
  padding: 6px 9px;
}

.meta .status-todo {
  background: #f2f5f6;
}

.meta .status-in_progress {
  background: #e8f1fb;
}

.meta .status-done {
  background: #eaf7f0;
}

.meta .status-hold {
  background: #fff5db;
}

.meta .status-deleted {
  background: #fdecec;
}

.badge {
  background: var(--warm);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  min-width: 28px;
  padding: 6px 9px;
  justify-content: center;
}

.button,
button.button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 650;
  justify-content: center;
  min-height: 38px;
  padding: 7px 12px;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button:disabled,
button.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button.success {
  border-color: #b8dcc9;
  color: var(--success);
}

.button.danger {
  border-color: #f3b6b0;
  color: var(--danger);
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.admin-table td small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.admin-status-pre {
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

.status-pill {
  background: #f4f0e8;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  margin: 2px 4px 2px 0;
  padding: 3px 8px;
}

.status-pill.done {
  background: #ecfdf3;
  border-color: #b8dcc9;
  color: var(--success);
}

.status-pill.deleted {
  background: #fff1f0;
  border-color: #f3b6b0;
  color: var(--danger);
}

.status-pill.warning {
  background: #fff7e8;
  border-color: #efd3a5;
  color: #98640d;
}

.status-pill.invited {
  background: #edf3ff;
  border-color: #b9c9e8;
  color: #31588f;
}

.admin-action-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 14px;
}

.admin-action-grid form {
  margin: 0;
}

.button.ghost {
  background: transparent;
}

.button.compact {
  font-size: 13px;
  min-height: 30px;
  padding: 4px 9px;
}

.archive-danger-form {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 16px;
}

.danger-panel {
  border-color: #f3b6b0;
}

.completion-panel {
  align-items: center;
  border-color: #b8dcc9;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.completion-panel h2 {
  margin-bottom: 6px;
}

.completion-panel p {
  color: var(--muted);
  margin-bottom: 0;
}

.danger-actions {
  margin-top: 18px;
}

.archive-task-preview {
  margin-top: 16px;
}

.archive-confirm-note {
  color: var(--muted);
  font-size: 13px;
  margin: 14px 0 0;
}

.section-head.compact {
  margin-bottom: 12px;
}

.button-row,
.form-actions,
.stack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

form label,
.form-card p {
  display: block;
  margin-bottom: 14px;
}

.auth-page {
  display: grid;
  min-height: calc(100vh - 150px);
  place-items: center;
}

.auth-immersive {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0 18%, transparent 18% 100%),
    linear-gradient(315deg, rgba(12, 76, 92, 0.2) 0 28%, transparent 28% 100%),
    #176b87;
  border: 1px solid #b8dce6;
  border-radius: 8px;
  margin: 0 auto;
  min-height: calc(100vh - 190px);
  overflow: hidden;
  padding: 42px 18px;
  position: relative;
  width: 100%;
}

.auth-card {
  max-width: 460px;
  width: min(100%, 460px);
}

.auth-card-elevated {
  box-shadow: 0 24px 60px rgba(20, 49, 58, 0.24);
  position: relative;
  z-index: 1;
}

.auth-card h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.auth-field {
  margin-bottom: 0;
}

.checkbox-field {
  align-items: flex-start;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr;
}

.checkbox-field input {
  margin-top: 4px;
}

.auth-actions {
  display: grid;
  gap: 10px;
}

.auth-separator {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 10px;
  grid-template-columns: 1fr auto 1fr;
  margin: 2px 0;
}

.auth-separator::before,
.auth-separator::after {
  background: var(--line);
  content: "";
  height: 1px;
}

.auth-note {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  text-align: center;
}

.input-with-action {
  position: relative;
}

.input-with-action input {
  padding-right: 76px;
}

.field-action {
  background: transparent;
  border: 0;
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 8px;
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.full-width {
  justify-content: center;
  text-align: center;
  width: 100%;
}

.public-plan-head {
  align-items: flex-end;
}

.public-plan-grid {
  margin-bottom: 16px;
}

.public-plan-card {
  position: relative;
}

.recommended-plan {
  box-shadow: 0 14px 32px rgba(23, 107, 135, 0.12);
}

.plan-badge {
  align-self: flex-start;
  background: var(--accent);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.plan-badge.muted {
  background: #e7f0f3;
  color: var(--accent-dark);
}

label span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 5px;
}

.field-hint {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 5px;
}

.character-counter {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
  text-align: right;
}

.character-counter.warning {
  color: #a16207;
}

.character-counter.danger {
  color: var(--danger);
}

input,
textarea,
select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  padding: 9px 10px;
  width: 100%;
}

input[type="checkbox"] {
  height: 16px;
  padding: 0;
  width: 16px;
}

textarea {
  resize: vertical;
}

.search-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr minmax(150px, auto) minmax(120px, auto) auto;
  margin-bottom: 16px;
}

.memo-search-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.field-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide-field {
  grid-column: span 2;
}

.toggle-field {
  align-items: flex-start;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  padding: 12px;
}

.toggle-field input {
  flex: 0 0 auto;
  margin-top: 4px;
}

.toggle-field span {
  color: var(--text);
  font-weight: 800;
}

.toggle-field small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-top: 3px;
}

.settings-subsection {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 16px;
}

.settings-menu {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.settings-menu.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.settings-menu-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 4px;
  padding: 13px;
  text-decoration: none;
}

.settings-menu.compact .settings-menu-card {
  align-items: center;
  border-radius: 999px;
  display: flex;
  min-height: 38px;
  padding: 8px 13px;
}

.settings-menu-card:hover {
  border-color: #b8dce6;
  box-shadow: 0 8px 22px rgba(35, 62, 71, 0.08);
}

.settings-menu-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-menu-card strong {
  color: var(--accent-dark);
  font-size: 15px;
}

.settings-menu.compact .settings-menu-card strong {
  font-size: 13px;
}

.settings-menu-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.settings-panel {
  scroll-margin-top: 88px;
}

.settings-anchor {
  display: block;
  height: 1px;
  scroll-margin-top: 88px;
}

.settings-details {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 14px 0;
  padding: 11px 12px;
}

.settings-details summary {
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.settings-details.settings-advanced {
  margin-bottom: 0;
}

.settings-details .settings-subsection {
  border-top: 0;
  margin-top: 12px;
  padding-top: 0;
}

.settings-details .data-list {
  margin-top: 12px;
}

.settings-primary-subsection {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.settings-collapsible-panel {
  padding: 0;
}

.settings-section-details {
  padding: 0;
}

.settings-section-details summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  padding: 18px 20px;
}

.settings-section-details summary::-webkit-details-marker {
  display: none;
}

.settings-section-details summary span {
  color: var(--accent-dark);
  font-size: 17px;
  font-weight: 900;
}

.settings-section-details summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.settings-section-details[open] {
  padding-bottom: 18px;
}

.settings-section-details > :not(summary) {
  margin-left: 20px;
  margin-right: 20px;
}

.settings-test-form {
  align-items: center;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px;
}

.settings-test-copy {
  display: grid;
  flex: 1 1 220px;
  gap: 3px;
  min-width: 0;
}

.settings-test-copy strong {
  color: var(--accent-dark);
  font-size: 14px;
}

.settings-test-copy p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.settings-mini-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-mini-grid div {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.settings-mini-grid strong {
  color: var(--accent-dark);
}

.settings-mini-grid p {
  color: var(--muted);
  margin: 0;
}

.briefing-fixed-time {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 10px 0 12px;
  padding: 12px;
}

.briefing-fixed-time strong {
  color: var(--accent-dark);
}

.briefing-fixed-time span {
  color: var(--text);
  font-weight: 850;
}

.locked-setting {
  align-items: center;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px;
}

.locked-setting strong {
  color: var(--accent-dark);
}

.locked-setting span {
  color: var(--muted);
  flex: 1 1 220px;
  font-size: 13px;
}

.settings-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.billing-panel {
  border-color: #e7c6c2;
}

.billing-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.billing-summary div {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 2px;
  padding: 12px;
}

.billing-summary span,
.billing-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.billing-summary strong {
  color: var(--accent-dark);
  font-size: 18px;
}

.cancel-preview {
  align-items: center;
  background: #fff8f8;
  border: 1px solid #f4cccc;
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px;
}

.cancel-preview strong {
  color: var(--danger);
}

.cancel-preview p {
  color: var(--muted);
  margin: 3px 0 0;
}

.account-delete-zone {
  margin-top: 18px;
}

.subscription-cancel-zone {
  align-items: center;
  background: #fffaf2;
  border: 1px solid #eed8ad;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 18px;
  padding: 18px;
}

.subscription-cancel-zone h2 {
  color: #8a5a13;
  margin: 0 0 4px;
}

.subscription-cancel-zone p {
  color: var(--muted);
  margin: 0;
}

.account-delete-subscription-warning {
  margin-bottom: 16px;
}

.account-delete-confirm {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(260px, 1fr);
}

.action-panel {
  border-color: #b8dce6;
  margin-bottom: 16px;
}

.task-candidate {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 14px;
  padding: 14px;
}

.custom-task-builder {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 16px;
}

.section-head.compact {
  align-items: flex-start;
}

.section-head.compact h2 {
  margin-bottom: 4px;
}

.custom-task-list {
  display: grid;
  gap: 12px;
}

.custom-task-card {
  background: #fffdf8;
  border-color: #eadfce;
}

.custom-task-card-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.small-button {
  font-size: 13px;
  min-height: 32px;
  padding: 5px 9px;
}

.checkline {
  align-items: center;
  display: flex;
  gap: 8px;
}

.checkline input {
  width: auto;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: var(--soft);
  border: 1px solid #cde6ec;
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
}

.chip.muted {
  background: var(--ink-soft);
  border-color: var(--line);
  color: var(--muted);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.segmented a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
}

.segmented a.active {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.segmented span {
  background: rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  color: inherit;
  font-size: 12px;
  min-width: 22px;
  padding: 1px 7px;
  text-align: center;
}

.calendar-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.calendar-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
}

.calendar-toolbar h2 {
  font-size: 22px;
  margin: 0;
}

.calendar-selected-summary {
  align-items: center;
  background: #f7fbfc;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.calendar-selected-summary span,
.section-kicker {
  color: var(--accent-dark);
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.calendar-selected-summary strong {
  color: var(--text);
  display: block;
  font-size: 20px;
  line-height: 1.2;
}

.calendar-selected-summary small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.calendar-selected-overview {
  background: #fffdf8;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
  scroll-margin-top: 84px;
}

.calendar-selected-overview-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.calendar-selected-overview h3 {
  font-size: 16px;
  margin: 2px 0 0;
}

.selected-day-preview-list {
  display: grid;
  gap: 7px;
}

.selected-day-preview-task {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 8px 10px;
}

.selected-day-preview-task.high {
  border-left-color: #c2410c;
}

.selected-day-preview-task.medium {
  border-left-color: #b7791f;
}

.selected-day-preview-task.low {
  border-left-color: #2f855a;
}

.selected-day-preview-task span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-day-more {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  justify-self: start;
}

.date-chip {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
}

.date-chip.due {
  background: var(--soft);
  color: var(--accent-dark);
}

.date-chip.event {
  background: var(--warm-soft);
  color: var(--warm);
}

.compact-empty {
  font-size: 13px;
  margin: 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  background: #f9fafb;
  border-bottom: 1px solid var(--line);
}

.calendar-weekdays div {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 9px;
  text-align: center;
}

.calendar-day {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 138px;
  padding: 10px;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day.muted {
  background: #fafafa;
  color: var(--muted);
}

.calendar-day.today {
  background: #eef6f8;
  box-shadow: inset 0 0 0 2px #b8dce6;
}

.calendar-day.selected {
  background: #fffaf0;
  box-shadow: inset 0 0 0 2px var(--accent-dark);
}

.calendar-day.has-high .task-count {
  background: #c2410c;
}

.calendar-day.overdue {
  background: #fff7ed;
}

.calendar-day-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.calendar-date-link {
  align-items: center;
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 30px;
  min-width: 30px;
  padding: 3px 8px;
}

.calendar-date-link:hover {
  background: var(--soft);
  color: var(--accent-dark);
}

.task-count {
  background: var(--accent);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  min-width: 32px;
  padding: 5px 7px;
  justify-content: center;
}

.task-count:hover {
  background: var(--accent-dark);
}

.task-count.empty-count {
  background: #eef1f4;
  color: var(--muted);
}

.task-count.empty-count:hover {
  background: #dfe5ea;
  color: var(--text);
}

.calendar-task-list {
  display: grid;
  gap: 5px;
}

.calendar-task {
  border-left: 4px solid var(--line);
  border-radius: 5px;
  background: #f9fafb;
  color: var(--accent-dark);
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  padding: 5px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-task-draggable {
  cursor: grab;
}

.calendar-task-draggable:active {
  cursor: grabbing;
}

.calendar-task.dragging {
  opacity: 0.55;
}

.calendar-task-fixed {
  cursor: default;
}

.calendar-task.high {
  border-left-color: #c2410c;
}

.calendar-task.medium {
  border-left-color: #b7791f;
}

.calendar-task.low {
  border-left-color: #2f855a;
}

.calendar-task-kind {
  background: rgba(23, 107, 135, 0.1);
  border-radius: 999px;
  color: var(--accent-dark);
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  margin-right: 4px;
  padding: 2px 5px;
}

.calendar-more,
.calendar-empty {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.calendar-detail-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  margin-top: 16px;
}

.selected-day-panel {
  border-color: #b8dce6;
}

.calendar-detail-list {
  display: grid;
  gap: 9px;
}

.calendar-detail-list.compact-list {
  gap: 7px;
}

.calendar-detail-task {
  align-items: center;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
}

.calendar-detail-task.high {
  border-left-color: #c2410c;
}

.calendar-detail-task.medium {
  border-left-color: #b7791f;
}

.calendar-detail-task.low {
  border-left-color: #2f855a;
}

.calendar-detail-task small {
  color: var(--muted);
  display: block;
  font-weight: 700;
  margin-top: 4px;
}

.muted-copy {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.weekly-shell {
  margin-bottom: 16px;
}

.weekly-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.week-day-column {
  border-right: 1px solid var(--line);
  min-height: 320px;
  padding: 10px;
}

.week-day-column:nth-child(7n) {
  border-right: 0;
}

.week-day-column.today {
  background: #eef6f8;
}

.week-day-column.selected {
  box-shadow: inset 0 0 0 2px var(--accent-dark);
}

.calendar-day.drag-over,
.week-day-column.drag-over,
.no-due-drop-zone.drag-over {
  background: #ecfeff;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.week-day-head {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}

.week-day-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.week-day-head strong {
  font-size: 18px;
}

.week-day-head a {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.week-task-list {
  display: grid;
  gap: 8px;
}

.week-task {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: grab;
  display: grid;
  gap: 4px;
  padding: 9px;
}

.week-task:active {
  cursor: grabbing;
}

.week-task.dragging {
  opacity: 0.55;
}

.week-task.high {
  border-left-color: #c2410c;
}

.week-task.medium {
  border-left-color: #b7791f;
}

.week-task.low {
  border-left-color: #2f855a;
}

.week-task span {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.week-task small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.week-task-title {
  color: var(--text);
  display: grid;
  gap: 4px;
}

.week-task-date-form {
  border-top: 1px solid var(--line);
  padding-top: 7px;
  position: relative;
}

.task-date-picker-label {
  display: block;
  height: 1px;
  margin: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.task-date-picker-label span {
  position: absolute;
}

.task-date-picker {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.no-due-drop-zone {
  margin-top: 16px;
}

.no-due-task-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.data-list {
  display: grid;
  gap: 8px;
  grid-template-columns: max-content 1fr;
}

.data-list dt {
  color: var(--muted);
  font-weight: 700;
}

.data-list dd {
  margin: 0;
}

.messages {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.message {
  border-radius: 6px;
  padding: 10px 12px;
}

.message.success {
  background: #eaf7f0;
  color: var(--success);
}

.message.error {
  background: #fdecec;
  color: var(--danger);
}

.message.warning {
  background: #fff4d6;
  color: #8a4f00;
}

.limit-guidance {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: space-between;
}

.limit-guidance a {
  color: inherit;
  font-weight: 850;
}

.message.info,
.notice {
  background: var(--soft);
  border-radius: 6px;
  color: var(--accent-dark);
  padding: 10px 12px;
}

.notice-panel {
  background: var(--soft);
  border: 1px solid #b8dce6;
  border-radius: 8px;
  color: var(--accent-dark);
  margin-bottom: 16px;
  padding: 14px 16px;
}

.notice-panel p {
  color: var(--muted);
  margin: 4px 0 0;
}

.overdue-reschedule-panel {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.overdue-reschedule-panel h2 {
  font-size: 16px;
  margin-bottom: 4px;
}

.overdue-reschedule-panel form {
  flex: 0 0 auto;
}

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

.mini-link {
  border-bottom: 1px solid var(--line);
  display: block;
  padding: 8px 0;
}

.body-text {
  white-space: normal;
}

.legal-doc {
  display: grid;
  gap: 14px;
  line-height: 1.8;
}

.legal-doc h2 {
  border-top: 1px solid var(--line);
  font-size: 18px;
  margin: 8px 0 0;
  padding-top: 16px;
}

.legal-doc p,
.legal-doc ul {
  margin: 0;
}

.danger-zone {
  align-items: center;
  background: #fff8f8;
  border: 1px solid #f4cccc;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px;
}

.danger-zone h2 {
  color: var(--danger);
  margin: 0 0 4px;
}

.danger-zone p {
  color: var(--muted);
  margin: 0;
}

.footer-actions {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.consult-widget {
  bottom: 22px;
  position: fixed;
  right: 22px;
  z-index: 30;
}

.consult-fab {
  align-items: center;
  background: var(--accent-dark);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(23, 107, 135, 0.22);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  font: inherit;
  font-weight: 850;
  min-height: 48px;
  padding: 0 18px;
}

.consult-fab:hover {
  background: var(--accent);
}

.consult-panel[hidden] {
  display: none;
}

.consult-panel {
  background: #fff;
  border: 1px solid #b8dce6;
  border-radius: 8px;
  bottom: 62px;
  box-shadow: 0 18px 48px rgba(32, 33, 36, 0.18);
  position: absolute;
  right: 0;
  width: min(360px, calc(100vw - 32px));
}

.secretary-widget-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 118px);
  overflow: hidden;
  padding: 0;
  width: min(440px, calc(100vw - 32px));
}

.consult-fab-badge {
  align-items: center;
  background: var(--warm);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  justify-content: center;
  line-height: 1;
  min-width: 24px;
  padding: 5px 7px;
}

.consult-panel-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 16px 16px 12px;
}

.consult-panel-head strong {
  color: var(--accent-dark);
  display: block;
  font-size: 16px;
  margin-bottom: 3px;
}

.consult-panel-head small,
.consult-note,
.consult-locked p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.consult-close {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font: inherit;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}

.consult-form {
  display: grid;
  gap: 10px;
}

.secretary-widget-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px;
}

.secretary-widget-body {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
}

.secretary-widget-body .notebook-section h2 {
  margin-bottom: 0;
}

.notebook-loading-note {
  background: #fffaf0;
  border: 1px solid #f2d7a2;
  border-radius: 8px;
  color: #7a4b12;
  display: grid;
  gap: 3px;
  margin-bottom: 2px;
  padding: 11px 12px;
}

.notebook-loading-note strong {
  font-size: 13px;
}

.notebook-loading-note span {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.consult-divider {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px;
  padding-top: 12px;
}

.consult-divider strong {
  color: var(--accent-dark);
  font-size: 15px;
}

.consult-divider small {
  color: var(--muted);
  font-size: 13px;
}

.secretary-consult-dock {
  background: #fff;
  border-top: 1px solid #d7edf3;
  box-shadow: 0 -8px 22px rgba(32, 33, 36, 0.06);
  flex: 0 0 auto;
  padding: 0 16px 16px;
}

.consult-form label {
  margin-bottom: 0;
}

.consult-locked {
  display: grid;
  gap: 12px;
}

.consultation-result {
  display: grid;
  gap: 16px;
}

.consultation-thread {
  display: grid;
  gap: 14px;
}

.consultation-turn {
  display: grid;
  gap: 8px;
}

.consultation-turn-latest {
  scroll-margin-top: 88px;
}

.consultation-turn-latest .consultation-block.answer {
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(23, 107, 135, 0.08);
}

.consultation-history-details {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
}

.consultation-history-details summary {
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.consultation-history-details .consultation-thread {
  margin-top: 12px;
}

.consultation-continuation-note {
  background: #f7fbfc;
  border: 1px solid #d7edf3;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  padding: 10px 12px;
}

.consultation-block {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.consultation-block span {
  color: var(--accent);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.consultation-block p {
  margin: 0;
}

.consultation-block.answer {
  background: var(--soft);
  border-color: #b8dce6;
}

.consultation-block.pending {
  background: #fff8ed;
  border-color: #f2cf9f;
}

.consult-result-form {
  display: grid;
  gap: 12px;
}

.consult-save-actions {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.consult-save-form {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.consult-save-form .task-due-picker {
  min-width: min(260px, 100%);
}

.task-save-form {
  flex: 1 1 320px;
}

.consult-followup-form {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding-top: 16px;
}

.consult-followup-form label {
  margin-bottom: 0;
}

.consultation-limit-message {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.secretary-reply-form {
  background: #f7fbfc;
  border: 1px solid #d7edf3;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
  padding: 12px;
}

.secretary-reply-form label {
  margin-bottom: 0;
}

.secretary-loading[hidden] {
  display: none;
}

.secretary-loading {
  align-items: center;
  background: rgba(32, 33, 36, 0.26);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 20px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 40;
}

.secretary-loading-box {
  background: #fff;
  border: 1px solid #b8dce6;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(32, 33, 36, 0.18);
  max-width: 420px;
  padding: 22px;
  text-align: center;
  width: min(100%, 420px);
}

.secretary-loading-box strong {
  color: var(--accent-dark);
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.secretary-loading-box p {
  color: var(--muted);
  margin-bottom: 0;
}

.is-secretary-loading {
  cursor: wait;
}

@media (max-width: 760px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
  }

  .brand small {
    display: none;
  }

  .nav {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    width: 100%;
  }

  .nav a,
  .nav-button,
  .quota-pill {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .layout {
    padding: 18px 14px;
  }

  .consult-widget {
    bottom: 14px;
    right: 14px;
  }

  .consult-panel {
    bottom: 58px;
    max-height: calc(100vh - 110px);
    overflow: hidden;
    width: calc(100vw - 28px);
  }

  .page-head,
  .section-head,
  .danger-zone,
  .subscription-cancel-zone,
  .usage-strip,
  .bulk-toolbar,
  .overdue-reschedule-panel,
  .plan-hero,
  .cancel-preview {
    align-items: stretch;
    flex-direction: column;
  }

  .bulk-actions {
    justify-content: stretch;
  }

  .bulk-actions .button {
    width: 100%;
  }

  .bulk-task-options {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .bulk-task-option {
    border-radius: 8px;
    justify-content: flex-start;
    min-height: 42px;
    width: 100%;
  }

  .dashboard-grid,
  .detail-grid,
  .secretary-brief,
  .field-grid,
  .usage-summary-grid,
  .onboarding-steps,
  .calendar-detail-grid,
  .billing-summary,
  .search-row,
  .task-quick-edit,
  .review-summary-grid,
  .review-flow,
  .review-next-main,
  .review-step-grid,
  .settings-menu,
  .settings-mini-grid,
  .date-role-grid,
  .account-delete-confirm,
  .topup-layout {
    grid-template-columns: 1fr;
  }

  .task-quick-edit .button {
    width: 100%;
  }

  .settings-section-details summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .settings-section-details summary small {
    text-align: left;
  }

  .settings-test-form .button {
    width: 100%;
  }

  .notebook-standalone-layout {
    grid-template-columns: 1fr;
  }

  .notebook-page-full {
    min-height: auto;
    padding: 18px 15px 18px 25px;
  }

  .notebook-page-full .notebook-page-head strong {
    font-size: 24px;
  }

  .notebook-date-panel {
    position: static;
  }

  .wide-field {
    grid-column: auto;
  }

  .brief-guidance {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 14px;
  }

  h1 {
    font-size: 24px;
  }

  .quick-form textarea {
    min-height: 180px;
  }

  .capture-actions {
    grid-template-columns: 1fr;
  }

  .notebook-greeting,
  .notebook-summary,
  .notebook-stats {
    grid-column: auto;
  }

  .notebook-stats {
    grid-template-columns: 1fr;
  }

  .panel-priority {
    grid-row: auto;
  }

  .segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .segmented a {
    justify-content: center;
  }

  .calendar-page-layout {
    display: flex;
    flex-direction: column;
  }

  .calendar-page-head {
    margin-bottom: 10px;
    order: 1;
  }

  .calendar-page-head .lead {
    display: none;
  }

  .calendar-page-head .button-row {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calendar-page-head .button {
    font-size: 12px;
    min-height: 34px;
    padding: 6px 7px;
  }

  .calendar-primary {
    order: 2;
  }

  .calendar-secondary {
    order: 3;
  }

  .calendar-shell {
    overflow-x: visible;
  }

  .calendar-grid {
    min-width: 0;
  }

  .calendar-weekdays div {
    font-size: 11px;
    padding: 6px 2px;
  }

  .calendar-day {
    min-height: 58px;
    padding: 4px 3px;
  }

  .calendar-selected-summary {
    padding: 9px 10px;
  }

  .calendar-selected-summary strong {
    font-size: 18px;
  }

  .calendar-selected-overview {
    gap: 8px;
    padding: 10px;
    scroll-margin-top: 78px;
  }

  .calendar-selected-overview-head {
    align-items: flex-start;
  }

  .calendar-selected-overview h3 {
    font-size: 15px;
  }

  .selected-day-preview-task {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 7px 8px;
  }

  .date-chip {
    font-size: 10px;
    padding: 5px 7px;
  }

  .calendar-day.today {
    box-shadow: inset 0 0 0 1px #88c7d6;
  }

  .calendar-day-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 0;
  }

  .calendar-date-link {
    font-size: 12px;
    min-height: 22px;
    min-width: 22px;
    padding: 1px 4px;
  }

  .task-count {
    font-size: 10px;
    min-width: 26px;
    padding: 4px 5px;
  }

  .calendar-task-list,
  .calendar-empty {
    display: none;
  }

  .week-task-list .calendar-empty {
    display: block;
  }

  .calendar-detail-task {
    align-items: stretch;
    flex-direction: column;
  }

  .weekly-board {
    grid-template-columns: 1fr;
  }

  .week-day-column {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    min-height: 120px;
  }

  .week-day-head {
    align-items: center;
    grid-template-columns: auto 1fr auto;
  }

.no-due-task-list {
    grid-template-columns: 1fr;
  }
}

.required-announcements,
.announcement-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.announcement-banner,
.announcement-card {
  border-left: 5px solid #6b8f99;
}

.announcement-banner {
  align-items: center;
  background: #f7fbfc;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(24, 54, 64, 0.08);
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr auto;
  padding: 16px;
}

.announcement-banner strong,
.announcement-card h2 {
  display: block;
  margin: 4px 0 6px;
}

.announcement-banner p,
.announcement-card p {
  color: var(--muted);
  margin: 0;
}

.announcement-level {
  background: rgba(41, 96, 111, 0.1);
  border-radius: 999px;
  color: #255d6b;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
}

.announcement-card-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.announcement-card-head time {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.level-important,
.level-emergency {
  border-left-color: #c9634a;
}

.level-important .announcement-level,
.level-emergency .announcement-level {
  background: rgba(201, 99, 74, 0.12);
  color: #9c402b;
}

.level-update {
  border-left-color: #4b8a68;
}

.level-update .announcement-level {
  background: rgba(75, 138, 104, 0.12);
  color: #376b4f;
}

.inline-choice {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
  margin: 6px 12px 0 0;
}

.inline-choice input {
  margin: 0;
}

.danger-choice {
  color: #9c402b;
  font-weight: 700;
}

.stacked-form {
  align-items: flex-start;
  display: grid;
  gap: 10px;
}

@media (max-width: 1024px) {
  .memo-bulk-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .memo-bulk-toolbar .bulk-toolbar-main {
    flex-basis: auto;
    width: 100%;
  }

  .memo-bulk-toolbar .bulk-task-options {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .memo-bulk-toolbar .bulk-task-option {
    border-radius: 8px;
    justify-content: flex-start;
    min-height: 42px;
    min-width: 0;
    width: 100%;
  }

  .memo-bulk-toolbar .bulk-actions {
    justify-content: stretch;
    width: 100%;
  }

  .memo-bulk-toolbar .bulk-actions .button {
    width: 100%;
  }
}

.usage-guide-actions {
  margin: 14px 0 6px;
}

.guide-panel {
  display: grid;
  gap: 12px;
}

.guide-frame-wrap {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 72vh;
  overflow: hidden;
}

.guide-frame {
  border: 0;
  display: block;
  height: 72vh;
  width: 100%;
}

.guide-fallback {
  margin: 0;
}

.usage-history-summary {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 18px;
}

.usage-history-card {
  display: grid;
  gap: 4px;
}

.usage-history-card span,
.usage-event-card time {
  color: var(--muted);
  font-size: 13px;
}

.usage-history-card strong {
  color: var(--accent-dark);
  font-size: 24px;
}

.usage-history-card small {
  color: var(--muted);
}

.usage-event-list {
  display: grid;
  gap: 10px;
}

.usage-event-card {
  align-items: center;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.usage-event-card strong {
  display: block;
  margin-top: 2px;
}

.usage-event-card p {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.usage-event-units {
  border-radius: 999px;
  display: inline-flex;
  font-weight: 800;
  min-width: 76px;
  padding: 6px 10px;
  justify-content: center;
}

.usage-event-units.consume {
  background: var(--soft);
  color: var(--accent-dark);
}

.usage-event-units.refund {
  background: #ecfdf3;
  color: var(--success);
}

.pagination {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

@media (max-width: 720px) {
  .announcement-banner {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .announcement-banner .button {
    width: 100%;
  }

  .announcement-card-head {
    flex-direction: column;
  }

  .guide-frame-wrap {
    min-height: 62vh;
  }

  .guide-frame {
    height: 62vh;
  }

  .usage-event-card {
    align-items: flex-start;
    flex-direction: column;
  }
}
