.thenio-common-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 60px;
  padding: 8px clamp(12px, 2vw, 22px);
  border-bottom: 1px solid hsl(var(--border, var(--line-hsl, 210 24% 84%)) / 0.48);
  background:
    linear-gradient(90deg, hsl(var(--secondary, var(--teal-hsl, 170 100% 33%)) / 0.2), hsl(var(--accent, var(--amber-hsl, 336 100% 68%)) / 0.14)),
    hsl(var(--card, var(--panel-hsl, 0 0% 100%)) / 0.9);
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  font-family: var(--font-sans, Inter, "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 28px hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.08);
}

.thenio-common-user {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.thenio-common-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 2px solid hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.78);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 24%, hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.45), transparent 48%),
    linear-gradient(135deg, hsl(var(--primary, var(--teal-hsl, 170 100% 33%))), hsl(var(--secondary, var(--amber-hsl, 336 100% 68%))));
  color: hsl(var(--primary-foreground, var(--submit-ink-hsl, 0 0% 100%)));
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 0 0 0 1px hsl(var(--background, var(--black-hsl, 210 33% 98%)) / 0.72), 0 0 18px hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.34);
}

.thenio-common-name {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  color: hsl(var(--primary, var(--teal-hsl, 170 100% 33%)));
  font-size: 0.95rem;
  font-weight: 800;
}

.thenio-common-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thenio-common-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 2px;
  color: hsl(var(--muted-foreground, var(--muted-hsl, 210 14% 40%)));
  font-size: 0.72rem;
  font-weight: 700;
  overflow-x: auto;
  max-width: min(1120px, calc(100vw - 92px));
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.thenio-common-nav a,
.thenio-common-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid hsl(var(--border, var(--line-hsl, 210 24% 84%)) / 0.58);
  border-radius: 999px;
  background: hsl(var(--card, var(--panel-hsl, 0 0% 100%)) / 0.5);
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.thenio-common-nav a[aria-current="page"] {
  color: hsl(var(--primary, var(--teal-hsl, 170 100% 33%)));
  border-color: hsl(var(--secondary, var(--amber-hsl, 336 100% 68%)) / 0.46);
  background: linear-gradient(90deg, hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.18), hsl(var(--secondary, var(--amber-hsl, 336 100% 68%)) / 0.18));
  font-weight: 900;
}

.thenio-common-separator {
  display: none;
}

.thenio-common-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.thenio-common-stat {
  min-width: 74px;
  text-align: center;
}

.thenio-common-stat label {
  display: block;
  margin-bottom: 3px;
  color: hsl(var(--muted-foreground, var(--muted-hsl, 210 14% 40%)));
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

.thenio-common-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 64px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid hsl(var(--border, var(--line-hsl, 210 24% 84%)) / 0.6);
  border-radius: 6px;
  background: hsl(var(--card, var(--panel-hsl, 0 0% 100%)) / 0.58);
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.thenio-common-stat.savings .thenio-common-badge {
  background: hsl(var(--secondary, var(--amber-hsl, 336 100% 68%)) / 0.72);
  color: hsl(var(--secondary-foreground, var(--submit-ink-hsl, 0 0% 100%)));
}

.thenio-common-stat.silver .thenio-common-badge {
  color: hsl(var(--primary, var(--teal-hsl, 170 100% 33%)));
}

.thenio-common-stat.gold .thenio-common-badge {
  color: hsl(35 88% 48%);
}

.thenio-common-help {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid hsl(var(--border, var(--line-hsl, 210 24% 84%)) / 0.7);
  border-radius: 50%;
  background: hsl(var(--card, var(--panel-hsl, 0 0% 100%)) / 0.72);
  color: hsl(var(--muted-foreground, var(--muted-hsl, 210 14% 40%)));
  font-size: 0.72rem;
  font-weight: 900;
}

body.thenio-common-header-active #root > div > header:first-child,
body.thenio-common-header-active #root > div.min-h-screen > header:first-child,
body.thenio-common-header-active .scene > .topbar {
  display: none !important;
}

body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] {
  display: block !important;
  position: relative !important;
  top: auto !important;
  z-index: 20 !important;
  border-bottom: 1px solid hsl(var(--border, var(--line-hsl, 210 24% 84%)) / 0.5) !important;
  background: hsl(var(--card, var(--panel-hsl, 0 0% 100%)) / 0.78) !important;
  box-shadow: none !important;
}

body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] > div {
  padding: 6px 10px !important;
}

body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] > div > div:first-child {
  display: none !important;
}

body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] .space-y-2 {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  width: fit-content !important;
  max-width: calc(100vw - 24px) !important;
  margin: 0 auto !important;
}

body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] .space-y-2 > div {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 6px !important;
  width: auto !important;
  max-width: 100% !important;
}

body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] .space-y-2 > div:first-child {
  display: flex !important;
}

body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] .space-y-2 > div:nth-child(2) {
  display: flex !important;
}

body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] .space-y-2 button {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 138px !important;
  max-width: 180px !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 3px 12px !important;
  border-radius: 6px !important;
  font-size: 0.78rem !important;
  line-height: 1 !important;
}

body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] [data-testid="button-diet-profile"],
body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] [data-testid="button-body-composition"],
body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] [data-testid="button-scale-archive"] {
  display: none !important;
}

body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] .space-y-2 svg {
  width: 13px !important;
  height: 13px !important;
}

.thenio-stoic-review-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.52);
  backdrop-filter: blur(7px);
}

.thenio-stoic-review-modal {
  width: min(560px, 100%);
  border: 1px solid hsl(var(--border, var(--line-hsl, 210 24% 84%)) / 0.7);
  border-radius: 8px;
  background:
    linear-gradient(135deg, hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.12), transparent 40%),
    hsl(var(--card, var(--panel-hsl, 0 0% 100%)) / 0.96);
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  box-shadow: 0 28px 96px hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.34);
  padding: clamp(18px, 4vw, 28px);
}

.thenio-stoic-review-kicker,
.thenio-stoic-review-coach {
  margin: 0 0 8px;
  color: hsl(var(--primary, var(--teal-hsl, 170 100% 33%)));
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
}

.thenio-stoic-review-modal h2 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.thenio-stoic-review-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.thenio-stoic-review-summary span {
  border: 1px solid hsl(var(--border, var(--line-hsl, 210 24% 84%)) / 0.6);
  border-radius: 6px;
  background: hsl(var(--background, var(--black-hsl, 210 33% 98%)) / 0.54);
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 900;
}

.thenio-stoic-review-text {
  margin: 0;
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.8;
}

.thenio-stoic-review-close {
  width: 100%;
  min-height: 42px;
  margin-top: 20px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, hsl(var(--primary, var(--teal-hsl, 170 100% 33%))), hsl(var(--secondary, var(--amber-hsl, 336 100% 68%))));
  color: hsl(var(--primary-foreground, var(--submit-ink-hsl, 0 0% 100%)));
  font-weight: 900;
  cursor: pointer;
}

.thenio-rion-review-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.62);
  backdrop-filter: blur(8px);
}

.thenio-rion-review-modal {
  width: min(720px, 100%);
  border: 1px solid hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.38);
  border-radius: 8px;
  background:
    linear-gradient(135deg, hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.12), transparent 44%),
    linear-gradient(315deg, hsl(var(--secondary, var(--amber-hsl, 336 100% 68%)) / 0.1), transparent 48%),
    hsl(var(--card, var(--panel-hsl, 0 0% 100%)) / 0.97);
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  box-shadow: 0 30px 110px hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.38);
  padding: clamp(18px, 4vw, 30px);
}

.thenio-rion-review-kicker {
  margin: 0 0 8px;
  color: hsl(var(--primary, var(--teal-hsl, 170 100% 33%)));
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.thenio-rion-review-modal h2 {
  margin: 0;
  font-size: clamp(1.28rem, 4vw, 2rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.thenio-rion-review-text {
  margin: 14px 0 18px;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.75;
}

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

.thenio-rion-review-card {
  display: grid;
  gap: 10px;
  min-height: 178px;
  border: 1px solid hsl(var(--border, var(--line-hsl, 210 24% 84%)) / 0.7);
  border-radius: 8px;
  background: hsl(var(--background, var(--black-hsl, 210 33% 98%)) / 0.56);
  padding: 12px;
}

.thenio-rion-review-card span {
  color: hsl(var(--muted-foreground, var(--muted-hsl, 210 14% 40%)));
  font-size: 0.74rem;
  font-weight: 900;
}

.thenio-rion-review-card strong {
  display: block;
  margin-top: 4px;
  color: hsl(var(--primary, var(--teal-hsl, 170 100% 33%)));
  font-size: 1.35rem;
  line-height: 1;
}

.thenio-rion-review-card p {
  margin: 8px 0 0;
  color: hsl(var(--muted-foreground, var(--muted-hsl, 210 14% 40%)));
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.55;
}

.thenio-rion-review-card button,
.thenio-rion-review-skip {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, hsl(var(--primary, var(--teal-hsl, 170 100% 33%))), hsl(var(--secondary, var(--amber-hsl, 336 100% 68%))));
  color: hsl(var(--primary-foreground, var(--submit-ink-hsl, 0 0% 100%)));
  font-weight: 900;
  cursor: pointer;
}

.thenio-rion-review-actions {
  margin-top: 14px;
}

.thenio-rion-review-skip {
  width: 100%;
  background: hsl(var(--background, var(--black-hsl, 210 33% 98%)) / 0.76);
  border: 1px solid hsl(var(--border, var(--line-hsl, 210 24% 84%)) / 0.8);
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
}

body.thenio-update-notice-open {
  overflow: hidden;
}

.thenio-basic-guard-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.54);
  backdrop-filter: blur(8px);
}

.thenio-basic-guard-modal {
  width: min(540px, 100%);
  border: 1px solid hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.12), transparent 42%),
    hsl(var(--card, var(--panel-hsl, 0 0% 100%)) / 0.97);
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  box-shadow: 0 28px 96px hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.36);
  padding: clamp(18px, 4vw, 28px);
}

.thenio-basic-guard-kicker {
  margin: 0 0 8px;
  color: hsl(var(--primary, var(--teal-hsl, 170 100% 33%)));
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.thenio-basic-guard-modal h2 {
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1.2;
  letter-spacing: 0;
}

.thenio-basic-guard-modal p:not(.thenio-basic-guard-kicker) {
  margin: 12px 0 18px;
  color: hsl(var(--muted-foreground, var(--muted-hsl, 210 14% 40%)));
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.7;
}

.thenio-basic-guard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.thenio-basic-guard-actions button {
  min-height: 40px;
  border: 1px solid hsl(var(--border, var(--line-hsl, 210 24% 84%)) / 0.8);
  border-radius: 6px;
  background: hsl(var(--background, var(--bg-hsl, 45 35% 95%)) / 0.76);
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  font-weight: 900;
  padding: 0 14px;
  cursor: pointer;
}

.thenio-basic-guard-actions [data-basic-settings-go] {
  border: 0;
  background: linear-gradient(90deg, hsl(var(--primary, var(--teal-hsl, 170 100% 33%))), hsl(var(--secondary, var(--amber-hsl, 336 100% 68%))));
  color: hsl(var(--primary-foreground, var(--submit-ink-hsl, 0 0% 100%)));
}

.thenio-update-notice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 6200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.58);
  backdrop-filter: blur(9px);
}

.thenio-update-notice-modal {
  position: relative;
  width: min(760px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  border: 1px solid hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.16), transparent 42%),
    linear-gradient(315deg, hsl(var(--secondary, var(--amber-hsl, 336 100% 68%)) / 0.12), transparent 48%),
    hsl(var(--card, var(--panel-hsl, 0 0% 100%)) / 0.98);
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  box-shadow: 0 34px 120px hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.38);
  padding: clamp(20px, 4vw, 34px);
}

.thenio-update-notice-x {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid hsl(var(--border, var(--line-hsl, 210 24% 84%)) / 0.72);
  border-radius: 50%;
  background: hsl(var(--background, var(--black-hsl, 210 33% 98%)) / 0.72);
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
}

.thenio-update-notice-kicker,
.thenio-dashboard-news-copy p {
  margin: 0 0 8px;
  color: hsl(var(--primary, var(--teal-hsl, 170 100% 33%)));
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
}

.thenio-update-notice-modal h2 {
  margin: 0;
  padding-right: 36px;
  font-size: clamp(1.5rem, 4.4vw, 2.35rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.thenio-update-notice-lead {
  margin: 14px 0 18px;
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.75;
}

.thenio-update-notice-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.thenio-update-notice-list li {
  position: relative;
  min-height: 40px;
  border: 1px solid hsl(var(--border, var(--line-hsl, 210 24% 84%)) / 0.62);
  border-radius: 8px;
  background: hsl(var(--background, var(--black-hsl, 210 33% 98%)) / 0.56);
  padding: 10px 12px 10px 34px;
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.55;
}

.thenio-update-notice-list li::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--primary, var(--teal-hsl, 170 100% 33%))), hsl(var(--secondary, var(--amber-hsl, 336 100% 68%))));
  box-shadow: 0 0 14px hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.38);
}

.thenio-update-notice-note {
  margin: 18px 0 0;
  border: 1px solid hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.24);
  border-radius: 8px;
  background: hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.08);
  padding: 12px;
  color: hsl(var(--muted-foreground, var(--muted-hsl, 210 14% 40%)));
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.7;
}

.thenio-update-notice-confirm,
.thenio-dashboard-news-button,
.thenio-dashboard-tool-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, hsl(var(--primary, var(--teal-hsl, 170 100% 33%))), hsl(var(--secondary, var(--amber-hsl, 336 100% 68%))));
  color: hsl(var(--primary-foreground, var(--submit-ink-hsl, 0 0% 100%)));
  font-weight: 900;
  cursor: pointer;
}

.thenio-update-notice-confirm {
  width: 100%;
  margin-top: 18px;
}

.thenio-dashboard-news {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(100% - 24px, 960px);
  margin: 14px auto 10px;
  border: 1px solid hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.26);
  border-radius: 8px;
  background:
    linear-gradient(90deg, hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.12), hsl(var(--secondary, var(--amber-hsl, 336 100% 68%)) / 0.1)),
    hsl(var(--card, var(--panel-hsl, 0 0% 100%)) / 0.74);
  box-shadow: 0 14px 40px hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.08);
  padding: 12px 14px;
}

.thenio-dashboard-news-copy {
  min-width: 0;
}

.thenio-dashboard-news-copy h2 {
  margin: 0;
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

.thenio-dashboard-news-button {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 0 16px;
}

.thenio-dashboard-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(100% - 24px, 960px);
  margin: 0 auto 14px;
}

.thenio-dashboard-tool-card {
  border: 1px solid hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, hsl(var(--card, var(--panel-hsl, 0 0% 100%)) / 0.92), hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.08)),
    hsl(var(--card, var(--panel-hsl, 0 0% 100%)) / 0.8);
  box-shadow: 0 16px 42px hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.08);
  padding: 14px;
}

.thenio-dashboard-tool-card.wide {
  grid-column: 1 / -1;
}

.thenio-dashboard-tool-card:focus {
  outline: 2px solid hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.7);
  outline-offset: 3px;
}

.thenio-dashboard-focus {
  animation: thenio-dashboard-focus 1.5s ease;
}

@keyframes thenio-dashboard-focus {
  0%,
  100% {
    box-shadow: 0 16px 42px hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.08);
  }
  40% {
    box-shadow: 0 0 0 4px hsl(var(--primary, var(--teal-hsl, 170 100% 33%)) / 0.22), 0 18px 48px hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.12);
  }
}

.thenio-dashboard-tool-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.thenio-dashboard-tool-head p {
  margin: 0;
  color: hsl(var(--primary, var(--teal-hsl, 170 100% 33%)));
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.thenio-dashboard-tool-head h2 {
  margin: 0;
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
}

.thenio-dashboard-tool-note {
  margin: -2px 0 12px;
  color: hsl(var(--muted-foreground, var(--muted-hsl, 210 14% 40%)));
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.65;
}

.thenio-dashboard-tool-form {
  display: grid;
  gap: 10px;
}

.thenio-dashboard-form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.thenio-dashboard-field {
  display: grid;
  gap: 5px;
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  font-size: 0.78rem;
  font-weight: 800;
}

.thenio-dashboard-field input,
.thenio-dashboard-field select,
.thenio-dashboard-field textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.16);
  border-radius: 6px;
  background: hsl(var(--background, var(--bg-hsl, 45 35% 95%)) / 0.72);
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  font: inherit;
  font-weight: 700;
  padding: 8px 10px;
}

.thenio-dashboard-field textarea {
  min-height: 108px;
  resize: vertical;
}

.thenio-dashboard-field.compact {
  max-width: 180px;
}

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

.thenio-dashboard-toggle-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)) / 0.12);
  border-radius: 6px;
  background: hsl(var(--background, var(--bg-hsl, 45 35% 95%)) / 0.48);
  color: hsl(var(--foreground, var(--ink-hsl, 210 28% 20%)));
  font-size: 0.8rem;
  font-weight: 850;
  padding: 7px 9px;
}

.thenio-dashboard-toggle-grid input {
  accent-color: hsl(var(--primary, var(--teal-hsl, 170 100% 33%)));
}

.thenio-dashboard-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.thenio-dashboard-tool-actions button {
  min-width: 110px;
  padding: 0 14px;
}

.thenio-dashboard-tool-actions button:disabled {
  cursor: wait;
  opacity: 0.66;
}

.thenio-dashboard-status {
  min-height: 1.2em;
  margin: 0;
  color: hsl(var(--muted-foreground, var(--muted-hsl, 210 14% 40%)));
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.5;
}

.thenio-dashboard-status[data-tone="ok"] {
  color: hsl(var(--primary, var(--teal-hsl, 170 100% 33%)));
}

.thenio-dashboard-status[data-tone="error"] {
  color: hsl(var(--destructive, 0 72% 51%));
}

@media (max-width: 760px) {
  .thenio-common-header {
    position: sticky;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px;
  }

  .thenio-common-user {
    align-items: flex-start;
  }

  .thenio-common-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    justify-content: stretch;
    gap: 6px;
  }

  .thenio-common-stat {
    min-width: 0;
  }

  .thenio-common-badge {
    width: 100%;
    min-width: 0;
  }

  .thenio-common-nav {
    font-size: 0.68rem;
  }

  .thenio-rion-review-grid {
    grid-template-columns: 1fr;
  }

  .thenio-update-notice-backdrop {
    padding: 10px;
  }

  .thenio-update-notice-modal {
    max-height: 88vh;
    padding: 18px 14px;
  }

  .thenio-update-notice-modal h2 {
    font-size: 1.38rem;
  }

  .thenio-update-notice-lead,
  .thenio-update-notice-list li,
  .thenio-update-notice-note {
    font-size: 0.84rem;
  }

  .thenio-dashboard-news {
    width: calc(100% - 16px);
    align-items: stretch;
    margin-top: 10px;
    padding: 10px;
  }

  .thenio-dashboard-tools {
    grid-template-columns: 1fr;
    width: calc(100% - 16px);
    gap: 10px;
  }

  .thenio-dashboard-tool-card {
    padding: 12px;
  }

  .thenio-dashboard-form-grid {
    grid-template-columns: 1fr;
  }

  .thenio-dashboard-toggle-grid {
    grid-template-columns: 1fr;
  }

  .thenio-dashboard-tool-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .thenio-dashboard-news-button {
    min-width: 72px;
    padding: 0 12px;
  }

  body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] > div {
    padding: 6px 8px !important;
  }

  body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] .space-y-2 > div:nth-child(2) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] .space-y-2 button {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 28px !important;
    height: 28px !important;
    font-size: 0.72rem !important;
  }

  body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] .space-y-2 {
    width: 100% !important;
  }

  body.thenio-common-header-active.thenio-calendar-page #root > div > header[data-common-header-keep-controls="true"] .space-y-2 > div:first-child {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }
}
