:root {
  color-scheme: light;
  --bg: #eeeae2;
  --surface: #fffdf8;
  --ink: #292724;
  --muted: #77716a;
  --line: #ded7cd;
  --soft: #f5f0e8;
  --accent: #292724;
  --fear: #363538;
  --anger: #bb453e;
  --sadness: #3e73a5;
  --joy: #b88913;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 20% 10%, rgba(213, 168, 40, .12), transparent 28%),
    radial-gradient(circle at 80% 90%, rgba(62, 115, 165, .12), transparent 30%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

button, input { font: inherit; }

.phone-shell {
  width: min(100%, 430px);
  min-height: min(820px, calc(100vh - 48px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(53, 45, 34, .14);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: relative;
  min-height: 86px;
  padding: 13px 62px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-header div {
  min-width: 0;
  text-align: center;
}

.app-header strong,
.app-header span { display: block; }

.app-header strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: .01em;
}

.app-header span {
  margin-top: 5px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  opacity: .72;
}

.icon-button {
  position: absolute;
  top: 50%;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  transform: translateY(-50%);
}

#back-button { left: 14px; }
#menu-button { right: 14px; font-size: 18px; }

.icon-button:hover { background: var(--surface); }
.icon-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.screen {
  flex: 1;
  padding: 28px max(22px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
}

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

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(29px, 8vw, 38px);
  font-weight: 400;
  line-height: 1.08;
  margin: 0 0 14px;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 400;
  margin: 0 0 12px;
}

p { line-height: 1.5; margin: 0 0 18px; }
.muted { color: var(--muted); }
.spacer { flex: 1; min-height: 24px; }

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.choices.single { grid-template-columns: 1fr; }

.practice-recommendations {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.practice-recommendation {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
}

.practice-recommendation .choice {
  width: 100%;
}

.practice-recommendation p {
  margin: 9px 6px 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.choice, .primary, .secondary {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  min-height: 52px;
}

.choice:hover, .secondary:hover { background: var(--soft); }
.choice.selected { border-color: var(--ink); background: var(--soft); }
.choice.fear { border-left: 5px solid var(--fear); }
.choice.anger { border-left: 5px solid var(--anger); }
.choice.sadness { border-left: 5px solid var(--sadness); }
.choice.joy { border-left: 5px solid var(--joy); }

.dictionary-spectrums .choice {
  min-height: 104px;
  border: 0;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fffdf8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  transition: filter .15s ease, transform .15s ease;
}

.dictionary-spectrums .choice.fear { background: var(--fear); }
.dictionary-spectrums .choice.anger { background: var(--anger); }
.dictionary-spectrums .choice.sadness { background: var(--sadness); }
.dictionary-spectrums .choice.joy {
  background: var(--joy);
  color: #fffdf8;
  box-shadow: inset 0 0 0 1px rgba(41, 39, 36, .12);
}

.dictionary-spectrums .choice:hover {
  filter: brightness(.94);
  transform: translateY(-1px);
}

.dictionary-spectrums .choice:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.primary {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
  text-align: center;
  margin-top: 18px;
}

.secondary { text-align: center; margin-top: 10px; }

.text-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 14px 8px 4px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link:hover { color: var(--ink); }

.range-wrap {
  margin: 30px 0 10px;
  padding: 20px 0;
}

.range-value {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 62px;
  text-align: center;
  margin-bottom: 18px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

input[type="range"].intensity {
  height: 12px;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(90deg, #eeeeee, #555555);
}

input[type="range"].intensity.fear {
  background: linear-gradient(90deg, #ededed, var(--fear));
  accent-color: var(--fear);
  color: var(--fear);
}

input[type="range"].intensity.anger {
  background: linear-gradient(90deg, #f8e9e7, var(--anger));
  accent-color: var(--anger);
  color: var(--anger);
}

input[type="range"].intensity.sadness {
  background: linear-gradient(90deg, #e8f0f7, var(--sadness));
  accent-color: var(--sadness);
  color: var(--sadness);
}

input[type="range"].intensity.joy {
  background: linear-gradient(90deg, #fff9dc, var(--joy));
  accent-color: var(--joy);
  color: var(--joy);
}

input[type="range"].intensity.mixed {
  background: linear-gradient(90deg, #eeeeee, #555555);
  accent-color: #555555;
  color: #555555;
}

input[type="range"].intensity::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: currentColor;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .22);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.tag-grid .choice {
  min-height: 0;
  padding: 10px 13px;
  border-radius: 999px;
}

.feelings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

.feeling-column {
  min-width: 0;
  padding: 12px;
  border-radius: 15px;
  background: var(--soft);
}

.feeling-column.fear { border-top: 5px solid var(--fear); }
.feeling-column.anger { border-top: 5px solid var(--anger); }
.feeling-column.sadness { border-top: 5px solid var(--sadness); }
.feeling-column.joy { border-top: 5px solid var(--joy); }

.feeling-column h3 {
  margin: 0 0 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 400;
}

.intensity-caption {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
}

.feeling-options {
  display: grid;
  gap: 7px;
}

.feeling-options .choice {
  width: 100%;
  min-height: 0;
  padding: 9px 8px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
}

.shade-option.fear { --group-color: var(--fear); }
.shade-option.anger { --group-color: var(--anger); }
.shade-option.sadness { --group-color: var(--sadness); }
.shade-option.joy { --group-color: var(--joy); }

.shade-option {
  background: color-mix(in srgb, var(--group-color) var(--shade-percent), var(--surface));
}

.shade-option.level-1 { background: color-mix(in srgb, var(--group-color) 9%, var(--surface)); }
.shade-option.level-2 { background: color-mix(in srgb, var(--group-color) 18%, var(--surface)); }
.shade-option.level-3 { background: color-mix(in srgb, var(--group-color) 28%, var(--surface)); }
.shade-option.level-4 { background: color-mix(in srgb, var(--group-color) 39%, var(--surface)); }
.shade-option.level-5 { background: color-mix(in srgb, var(--group-color) 51%, var(--surface)); }
.shade-option.level-6 { background: color-mix(in srgb, var(--group-color) 64%, var(--surface)); }
.shade-option.level-7 { background: color-mix(in srgb, var(--group-color) 78%, var(--surface)); }
.shade-option.level-8 { background: color-mix(in srgb, var(--group-color) 92%, var(--surface)); }

.shade-option.tone-dark { color: #fff; }
.shade-option.joy { color: #292724; }
.shade-option.selected {
  border-color: var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.definition-panel {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 14px;
  border-left: 3px solid var(--joy);
  border-radius: 0 12px 12px 0;
  background: var(--soft);
  line-height: 1.4;
}

.definition-panel span { color: var(--muted); }

@media (min-width: 760px) {
  .phone-shell { width: min(100%, 900px); }
  .feelings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.notice {
  border-left: 3px solid var(--joy);
  background: var(--soft);
  padding: 14px;
  border-radius: 0 12px 12px 0;
  font-size: 14px;
  line-height: 1.45;
  margin: 12px 0 18px;
}

.field-label {
  display: block;
  margin: 10px 0 7px;
  color: var(--muted);
  font-size: 13px;
}

.image-questions {
  display: grid;
  gap: 14px;
  margin: 8px 0 18px;
}

.image-question {
  display: grid;
  gap: 7px;
  color: var(--ink);
  line-height: 1.35;
}

.image-question span {
  font-size: 14px;
}

.text-field {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}

.text-field:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.menu-list {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}

.menu-list button {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.summary-row span:first-child { color: var(--muted); }
.summary-row span:last-child { text-align: right; }

.diary-list {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.diary-entry {
  --entry-color: var(--fear);
  padding: 14px;
  border-left: 5px solid var(--entry-color);
  border-radius: 4px 14px 14px 4px;
  background: color-mix(in srgb, var(--entry-color) 8%, var(--surface));
}

.diary-entry-open {
  width: 100%;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.diary-entry-open:hover { filter: saturate(1.08); }

.mixed-entry {
  border-left: 0;
  border-radius: 14px;
  background: var(--soft);
}

.diary-entry.fear { --entry-color: var(--fear); }
.diary-entry.anger { --entry-color: var(--anger); }
.diary-entry.sadness { --entry-color: var(--sadness); }
.diary-entry.joy { --entry-color: var(--joy); }

.diary-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.diary-entry-head strong {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.emotion-tags { flex-wrap: wrap; }
.emotion-tags b { color: var(--muted); font-weight: 400; }
.emotion-tag { padding: 4px 8px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 500; }
.emotion-tag.fear { background: var(--fear); }
.emotion-tag.anger { background: var(--anger); }
.emotion-tag.sadness { background: var(--sadness); }
.emotion-tag.joy { background: var(--joy); }
.incomplete-entry { border-left-style: dashed; opacity: .82; }

.diary-entry-head time {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.emotion-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--entry-color);
}

.diary-entry p {
  margin: 10px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.diary-entry dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.diary-entry dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.diary-entry dt { color: var(--muted); }
.diary-entry dd { margin: 0; text-align: right; }

.entry-back {
  align-self: flex-start;
  margin: -4px 0 20px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.entry-back:hover { color: var(--ink); }

.dynamics-periods,
.dynamics-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 1px 8px;
  scrollbar-width: none;
}

.dynamics-periods::-webkit-scrollbar,
.dynamics-filters::-webkit-scrollbar { display: none; }

.dynamics-period,
.dynamics-filter {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.dynamics-period.selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.dynamics-filters {
  margin-top: 8px;
  flex-wrap: wrap;
  overflow: visible;
}

.dynamics-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.dynamics-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dynamics-legend i {
  display: inline-block;
  width: 24px;
  height: 0;
  border-top: 2px solid var(--muted);
}

.dynamics-legend .before-sample { border-top-style: dashed; opacity: .65; }
.dynamics-legend .after-sample { border-top-style: solid; }

.dynamics-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  opacity: .45;
  padding: 7px 9px;
  font-size: 12px;
}

.dynamics-filter span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--filter-color);
}

.dynamics-filter.fear { --filter-color: var(--fear); }
.dynamics-filter.anger { --filter-color: var(--anger); }
.dynamics-filter.sadness { --filter-color: var(--sadness); }
.dynamics-filter.joy { --filter-color: var(--joy); }
.dynamics-filter.selected { opacity: 1; border-color: var(--filter-color); color: var(--ink); }

.dynamics-scroll {
  width: 100%;
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overscroll-behavior-x: contain;
}

.dynamics-canvas {
  position: relative;
  width: 920px;
  height: 360px;
  margin-inline: auto;
}

.dynamics-chart {
  display: block;
  width: 920px;
  height: 360px;
  touch-action: pan-x;
  user-select: none;
}

.zero-line { stroke: var(--line); stroke-width: 1.5; }
.axis-label { fill: var(--muted); font-size: 12px; }
.y-label { text-anchor: end; }
.date-label { text-anchor: middle; }
.emotion-line { fill: none; stroke-width: 1.5; opacity: .68; }
.state-line { stroke-width: 1.7; stroke-linecap: round; }
.before-line { stroke-dasharray: 5 5; opacity: .58; }
.after-line { opacity: .88; }
.emotion-point { stroke-width: 1.8; cursor: pointer; }
.emotion-point.selected { stroke-width: 3; filter: drop-shadow(0 0 2px rgba(41, 39, 36, .3)); }
.emotion-hit {
  fill: transparent;
  stroke: none;
  cursor: pointer;
  pointer-events: all;
}

.emotion-hit:focus-visible { stroke: var(--ink); stroke-width: 2; fill: rgba(255, 255, 255, .01); }

.dynamics-tooltip {
  position: absolute;
  z-index: 3;
  width: max-content;
  max-width: 190px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 5px 16px rgba(41, 39, 36, .14);
  font-size: 12px;
  line-height: 1.3;
  pointer-events: none;
}
.emotion-line, .practice-link, .emotion-point { pointer-events: stroke; }
.emotion-point { pointer-events: all; }

.dynamics-detail {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--joy);
  border-radius: 0 12px 12px 0;
  background: var(--soft);
}

.dynamics-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.reports-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.report-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.report-card:hover { background: var(--soft); }
.report-card span,
.report-card strong,
.report-card small { display: block; }
.report-card strong { font-weight: 500; }
.report-card small { margin-top: 4px; color: var(--muted); }
.report-card b { font-size: 18px; font-weight: 400; }

.report-observations {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.report-observations h3 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
}

.report-observations p { margin-bottom: 0; }
.report-observations ol { margin: 0; padding-left: 21px; }
.report-observations li { margin-bottom: 10px; line-height: 1.45; }

.settings-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.settings-heading strong,
.settings-heading span { display: block; }
.settings-heading strong { font-weight: 500; }
.settings-heading span { margin-top: 3px; color: var(--muted); font-size: 12px; }

.settings-switch {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  cursor: pointer;
  touch-action: pan-y;
}

.settings-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .2s ease, background .2s ease;
}

.settings-switch.on { background: var(--ink); border-color: var(--ink); }
.settings-switch.on i { background: var(--surface); transform: translateX(20px); }
.settings-label { margin: 18px 0 8px; color: var(--muted); font-size: 12px; }

.settings-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.settings-option {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.settings-option.selected { border-color: var(--ink); background: var(--ink); color: var(--surface); }

.settings-time-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  color: var(--muted);
}

.settings-time-label input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}

.settings-caption { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.settings-links { display: grid; gap: 8px; border-bottom: 0; }
.settings-links .choice { width: 100%; }

.privacy-mode { padding-top: 6px; }

.privacy-list {
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.privacy-list section {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.privacy-list section:last-child { border-bottom: 0; }
.privacy-list strong { font-weight: 500; }
.privacy-list p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

.privacy-controls { display: grid; }

.privacy-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.privacy-control strong { font-weight: 500; }
.privacy-control p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.privacy-control.disabled { opacity: .45; }
.settings-switch:disabled { cursor: default; }
.privacy-footnote { margin: 14px 0 0; color: var(--muted); font-size: 12px; }

.delete-warning {
  margin: 12px 0 20px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--anger) 38%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--anger) 8%, var(--surface));
}

.delete-warning strong { font-weight: 500; }
.delete-warning p { margin: 8px 0 0; font-size: 14px; }

.danger-button {
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--anger);
  border-radius: 14px;
  background: var(--anger);
  color: #fff;
  cursor: pointer;
}

.export-contents {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}

.export-contents strong { font-weight: 500; }
.export-contents ul { margin: 10px 0 0; padding-left: 20px; }
.export-contents li { margin-bottom: 7px; line-height: 1.4; }

.deep-formats {
  display: grid;
  gap: 10px;
  margin: 14px 0 20px;
}

.deep-format {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 11px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.deep-format:hover { background: var(--soft); }
.deep-format.selected { border-color: var(--ink); background: var(--soft); }
.deep-format-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--surface);
  font-size: 14px;
}

.deep-format.selected .deep-format-check { border-color: var(--ink); background: var(--ink); }
.deep-format strong,
.deep-format small { display: block; }
.deep-format strong { font-weight: 500; }
.deep-format small { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.demo-label {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(245, 240, 232, .55);
  font-size: 12px;
  line-height: 1.4;
}

.shade-accordion {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top-width: 5px;
  background: var(--surface);
}

.shade-accordion-head {
  width: 100%;
  min-height: 64px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.shade-accordion-head span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
}

.shade-accordion-head small { color: var(--muted); }
.shade-accordion-head b { width: 24px; font-size: 22px; font-weight: 400; text-align: center; }
.shade-accordion-body { padding: 0 12px 14px; border-top: 1px solid var(--line); }
.shade-level { margin-top: 14px; }
.shade-level h4 { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }

.selected-shades {
  margin-top: 16px;
  padding: 13px;
  border-radius: 13px;
  background: var(--soft);
}

.selected-shades > strong { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 500; }
.selected-shades > div { display: flex; flex-wrap: wrap; gap: 7px; }
.selected-shades button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.selected-shades button span { margin-left: 5px; color: var(--muted); }

.sticky-action {
  position: sticky;
  z-index: 4;
  bottom: max(0px, env(safe-area-inset-bottom));
  margin: 18px -4px -10px;
  padding: 1px 4px 10px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0), var(--surface) 20%);
}
.sticky-action .primary { width: 100%; }

.definition-panel.floating {
  position: sticky;
  z-index: 5;
  bottom: max(12px, env(safe-area-inset-bottom));
  padding-right: 42px;
  box-shadow: 0 10px 28px rgba(41, 39, 36, .16);
}

.definition-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(41, 39, 36, .08);
  color: var(--ink);
  cursor: pointer;
}

.dictionary-group {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--group-color);
  border-radius: 16px;
  background: var(--surface);
}
.dictionary-group.fear { --group-color: var(--fear); }
.dictionary-group.anger { --group-color: var(--anger); }
.dictionary-group.sadness { --group-color: var(--sadness); }
.dictionary-group.joy { --group-color: var(--joy); }
.dictionary-group h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 400; }
.dictionary-words { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.dictionary-words .choice { min-height: 40px; padding: 9px 8px; font-size: 13px; text-align: center; }

.shade-choice-wrap,
.dictionary-word { min-width: 0; }

.shade-choice-wrap.definition-open,
.dictionary-word.definition-open {
  display: grid;
  gap: 7px;
}

.dictionary-word.definition-open { grid-column: 1 / -1; }

.inline-definition {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-left: 3px solid var(--joy);
  border-radius: 2px 12px 12px 2px;
  background: rgba(235, 225, 211, .82);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.42;
  animation: inline-definition-open .22s ease-out both;
}

.inline-definition strong { font-weight: 500; }
.inline-definition span { color: var(--muted); }
.inline-research {
  justify-self: start;
  min-height: 0;
  margin-top: 3px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@keyframes inline-definition-open {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.practice-steps { display: grid; gap: 12px; margin: 18px 0; }
.practice-step { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; line-height: 1.48; }
.practice-step span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 12px; }
.support-message, .application-data {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  line-height: 1.5;
}
.application-data ul { margin: 10px 0; padding-left: 20px; }
.application-data p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.link-button { display: block; width: 100%; text-decoration: none; }
.safety-footnote { margin-top: 20px; color: var(--muted); font-size: 12px; }

.sending-indicator { display: flex; justify-content: center; gap: 8px; margin: 36px 0; }
.sending-indicator span { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); animation: sending-pulse 1.1s infinite ease-in-out; }
.sending-indicator span:nth-child(2) { animation-delay: .15s; }
.sending-indicator span:nth-child(3) { animation-delay: .3s; }
@keyframes sending-pulse { 0%, 70%, 100% { opacity: .25; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-4px); } }

.feeling-transition { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 18px 0; padding: 14px; border: 1px solid var(--line); border-radius: 15px; }
.feeling-transition div { min-width: 0; }
.feeling-transition span, .feeling-transition strong, .feeling-transition small { display: block; }
.feeling-transition span, .feeling-transition small { color: var(--muted); font-size: 12px; }
.feeling-transition strong { margin: 4px 0; font-weight: 500; }
.feeling-transition b { font-weight: 400; }

.observation-scope { margin: -4px 0 12px !important; color: var(--muted); font-size: 12px; }
.empty-chart-label { fill: var(--muted); font-size: 14px; text-anchor: middle; }

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

@media (max-width: 480px) {
  body { padding: 0; background: var(--surface); }
  .phone-shell { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
}

@media (max-width: 360px) {
  .feelings-grid { grid-template-columns: 1fr; }
}

/* «Живая глубина» — выбранное визуальное направление */
:root {
  --bg: #ddd7cd;
  --surface: #f6eee1;
  --ink: #292622;
  --muted: #756d65;
  --line: #d9cebf;
  --soft: #ebe1d3;
  --accent: #292622;
  --fear: #353337;
  --anger: #b9483f;
  --sadness: #3f75a7;
  --joy: #b98b16;
}

body {
  background:
    radial-gradient(circle at 17% 12%, rgba(185, 139, 22, .12), transparent 28%),
    radial-gradient(circle at 86% 88%, rgba(63, 117, 167, .11), transparent 30%),
    var(--bg);
}

.phone-shell {
  position: relative;
  isolation: isolate;
  background: var(--surface);
  border-color: rgba(87, 75, 62, .14);
  box-shadow: 0 24px 70px rgba(52, 45, 37, .17);
}

.phone-shell::before,
.phone-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.phone-shell::before {
  width: 310px;
  height: 390px;
  top: 115px;
  right: -225px;
  border: 1px solid rgba(185, 139, 22, .25);
  box-shadow: 0 0 0 34px rgba(185, 72, 63, .06), 0 0 0 72px rgba(185, 139, 22, .05);
  transform: rotate(-13deg);
}

.phone-shell::after {
  width: 230px;
  height: 330px;
  left: -185px;
  bottom: -130px;
  border: 1px solid rgba(63, 117, 167, .25);
  box-shadow: 0 0 0 42px rgba(53, 51, 55, .035);
  transform: rotate(-24deg);
}

.app-header,
.screen,
.app-motto { position: relative; z-index: 1; }

.app-header {
  min-height: 92px;
  padding: 13px 56px;
  background: rgba(246, 238, 225, .82);
  border-bottom: 0;
  backdrop-filter: blur(18px);
}

.app-header::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--fear) 0 25%, var(--anger) 25% 50%, var(--sadness) 50% 75%, var(--joy) 75%);
}

.app-header .app-brand {
  display: grid;
  grid-template-columns: 30px minmax(0, auto);
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  text-align: left;
}

.app-header .app-brand-copy { min-width: 0; text-align: center; }
.app-header .app-brand-copy strong { font-size: 24px; }
.app-header .app-brand-copy span { font-size: 11px; white-space: nowrap; }

.brand-mark {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  transform: rotate(6deg);
}

.brand-mark i {
  position: absolute;
  width: 9px;
  height: 15px;
  left: 10px;
  top: 0;
  border-radius: 80% 20% 70% 30%;
  background: var(--fear);
  transform-origin: 5px 15px;
}

.brand-mark i:nth-child(2) { background: var(--anger); transform: rotate(90deg); }
.brand-mark i:nth-child(3) { background: var(--sadness); transform: rotate(180deg); }
.brand-mark i:nth-child(4) { background: var(--joy); transform: rotate(270deg); }

.icon-button {
  width: 40px;
  height: 40px;
  border: 0;
  background: rgba(41, 38, 34, .07);
}

.icon-button:hover { background: rgba(41, 38, 34, .12); }

.back-icon-button {
  display: grid;
  place-items: center;
  background: rgba(255, 251, 244, .78);
  box-shadow: 0 4px 12px rgba(61, 50, 40, .1);
}

.icon-button[hidden] { display: none !important; }

.back-icon-button svg {
  width: 22px;
  height: 22px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .16s ease;
}

.back-icon-button:hover svg { transform: translateX(-2px); }

.screen { padding: 34px 24px 30px; }
.eyebrow {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

h1, h2 { color: var(--ink); }
h1 { font-size: clamp(34px, 9vw, 45px); }
h2 { font-size: clamp(29px, 7.5vw, 38px); line-height: 1.09; }
p { line-height: 1.55; }

.choice,
.primary,
.secondary {
  border-color: var(--line);
  border-radius: 18px;
}

.primary {
  min-height: 58px;
  border: 0;
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 9px 22px rgba(41, 38, 34, .16);
  font-weight: 500;
}

.primary:hover { background: #171513; transform: translateY(-1px); }
.secondary { background: rgba(255, 251, 244, .62); }

.choices:has(.base-feeling) { gap: 12px; }
.base-feeling {
  --emotion-color: var(--fear);
  position: relative;
  isolation: isolate;
  min-height: 108px;
  overflow: hidden;
  padding: 18px 20px;
  border: 0 !important;
  border-radius: 25px;
  background: var(--emotion-color) !important;
  color: #fffaf1 !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  box-shadow: 0 9px 20px color-mix(in srgb, var(--emotion-color) 22%, transparent);
  transition: transform .16s ease, box-shadow .16s ease;
}

.base-feeling.fear { --emotion-color: var(--fear); }
.base-feeling.anger { --emotion-color: var(--anger); }
.base-feeling.sadness { --emotion-color: var(--sadness); }
.base-feeling.joy { --emotion-color: var(--joy); }
.base-feeling:hover { filter: none !important; transform: translateY(-2px); }
.base-feeling.selected {
  outline: 3px solid var(--surface);
  outline-offset: -7px;
  box-shadow: 0 0 0 2px var(--emotion-color), 0 12px 24px color-mix(in srgb, var(--emotion-color) 28%, transparent);
}

.base-feeling::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .22;
  pointer-events: none;
}

.base-feeling.fear::after {
  background:
    radial-gradient(circle at 102% 10%, transparent 0 33px, #fff 34px 35px, transparent 36px 54px, #fff 55px 56px, transparent 57px 76px, #fff 77px 78px, transparent 79px);
}

.base-feeling.anger::after {
  inset: auto -4px -26px auto;
  width: 105px;
  height: 126px;
  background:
    radial-gradient(ellipse at 50% 100%, transparent 0 32%, #fff 33% 34%, transparent 35%),
    radial-gradient(ellipse at 28% 100%, transparent 0 43%, #fff 44% 45%, transparent 46%);
  transform: rotate(-9deg);
}

.base-feeling.sadness::after {
  top: 42%;
  height: 70px;
  background:
    radial-gradient(80px 25px at 10% 0, transparent 63%, #fff 65% 66%, transparent 68%) 0 0 / 130px 42px repeat-x,
    radial-gradient(80px 25px at 70% 0, transparent 63%, #fff 65% 66%, transparent 68%) 35px 23px / 145px 44px repeat-x;
}

.base-feeling.joy::after {
  inset: -16px -8px auto auto;
  width: 108px;
  height: 108px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, #fff 0 1deg, transparent 1deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 0 31px, #000 32px 33px, transparent 34px 44px, #000 45px 100%);
  mask: radial-gradient(circle, transparent 0 31px, #000 32px 33px, transparent 34px 44px, #000 45px 100%);
}

.dictionary-spectrums .base-feeling { min-height: 108px; }

.notice,
.definition-panel,
.support-message,
.application-data,
.export-contents,
.delete-warning {
  border: 1px solid rgba(185, 139, 22, .2);
  border-left: 4px solid var(--joy);
  border-radius: 4px 16px 16px 4px;
  background: rgba(235, 225, 211, .72);
}

.summary {
  gap: 0;
  padding: 4px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 251, 244, .62);
}
.summary-row { padding: 13px 0; }
.summary-row:last-child { border-bottom: 0; }

.range-wrap {
  padding: 24px 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 251, 244, .58);
}

.range-value { color: var(--ink); }

.menu-list { gap: 11px; }
.menu-list button {
  position: relative;
  min-height: 62px;
  justify-content: flex-start;
  gap: 14px;
  padding-left: 48px;
  background: rgba(255, 251, 244, .68);
  box-shadow: 0 5px 14px rgba(74, 61, 48, .05);
}
.menu-list button::before {
  content: "";
  position: absolute;
  left: 20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--menu-color, var(--joy));
}
.menu-list button:nth-child(1) { --menu-color: var(--fear); }
.menu-list button:nth-child(2) { --menu-color: var(--anger); }
.menu-list button:nth-child(3) { --menu-color: var(--sadness); }
.menu-list button:nth-child(4) { --menu-color: var(--joy); }
.menu-list button:nth-child(5) { --menu-color: var(--anger); }
.menu-list button:nth-child(6) { --menu-color: var(--fear); }

.tag-grid .choice,
.dictionary-words .choice,
.settings-option {
  background: rgba(255, 251, 244, .68);
}

.practice-recommendation,
.deep-format,
.report-card,
.diary-entry,
.dictionary-group,
.shade-accordion,
.privacy-control {
  border-color: var(--line);
  background: rgba(255, 251, 244, .68);
  box-shadow: 0 7px 18px rgba(74, 61, 48, .055);
}

.practice-recommendation:nth-child(4n+1) { border-top: 4px solid var(--fear); }
.practice-recommendation:nth-child(4n+2) { border-top: 4px solid var(--anger); }
.practice-recommendation:nth-child(4n+3) { border-top: 4px solid var(--sadness); }
.practice-recommendation:nth-child(4n+4) { border-top: 4px solid var(--joy); }

.practice-step span { background: var(--joy); color: #fffaf1; }
.practice-step:nth-child(4n+2) span { background: var(--sadness); }
.practice-step:nth-child(4n+3) span { background: var(--anger); }
.practice-step:nth-child(4n+4) span { background: var(--fear); }
.practice-step p { margin: 3px 0 0; }

.deep-format { border-radius: 19px; }
.deep-format.selected {
  border-color: var(--joy);
  background: color-mix(in srgb, var(--joy) 9%, var(--surface));
  box-shadow: 0 0 0 2px rgba(185, 139, 22, .15);
}
.deep-format.selected .deep-format-check { border-color: var(--joy); background: var(--joy); }

.settings-section { border-color: var(--line); }
.settings-switch.on { background: var(--joy); }
.settings-option.selected { border-color: var(--joy); background: rgba(185, 139, 22, .11); }

.dynamics-scroll { background: rgba(255, 251, 244, .76); border-color: var(--line); }
.report-observations { border-color: var(--line); }
.dynamics-period.selected { background: var(--ink); }

.app-motto {
  display: none;
  padding: 4px 24px 26px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.motto-dots { display: flex; justify-content: center; gap: 24px; margin-bottom: 12px; }
.motto-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--fear); }
.motto-dots i:nth-child(2) { background: var(--anger); }
.motto-dots i:nth-child(3) { background: var(--sadness); }
.motto-dots i:nth-child(4) { background: var(--joy); }
body[data-route="base"] .app-motto,
body[data-route="welcome"] .app-motto,
body[data-route="menu"] .app-motto,
body[data-route="thanks"] .app-motto { display: block; }

/* Вводный экран */
body[data-route="welcome"] .screen {
  justify-content: center;
  padding-top: 26px;
}

.welcome-intro {
  width: 100%;
  animation: welcome-enter .65s cubic-bezier(.2, .7, .2, 1) both;
}

.welcome-intro h1 {
  margin-bottom: 16px;
  font-size: clamp(39px, 10vw, 49px);
  line-height: .99;
}

.welcome-lead {
  max-width: 37ch;
  margin-bottom: 22px;
  color: #514c46;
  font-size: 16px;
}

.welcome-compass {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 0 0 22px;
}

.welcome-emotion {
  --emotion-color: var(--fear);
  position: relative;
  min-width: 0;
  height: 94px;
  overflow: hidden;
  border-radius: 40px 40px 18px 18px;
  background: var(--emotion-color);
  color: #fffaf1;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--emotion-color) 22%, transparent);
}

.welcome-emotion.anger { --emotion-color: var(--anger); transform: translateY(9px); }
.welcome-emotion.sadness { --emotion-color: var(--sadness); transform: translateY(3px); }
.welcome-emotion.joy { --emotion-color: var(--joy); transform: translateY(-5px); }

.welcome-emotion svg {
  position: absolute;
  top: 9px;
  left: 50%;
  width: min(72%, 66px);
  height: 50px;
  overflow: visible;
  color: rgba(255, 255, 255, .62);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateX(-50%);
}

.welcome-emotion .symbol-fill { fill: rgba(255, 255, 255, .09); }
.welcome-emotion.anger svg { width: 54px; top: 5px; }
.welcome-emotion.sadness svg { width: 72px; }
.welcome-emotion.joy svg { width: 58px; }

.welcome-emotion b {
  position: absolute;
  right: 0;
  bottom: 13px;
  left: 0;
  overflow: hidden;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  text-overflow: ellipsis;
}

.welcome-prompt {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-left: 3px solid var(--joy);
  border-radius: 0 16px 16px 0;
  background: rgba(235, 225, 211, .68);
  line-height: 1.42;
}

.welcome-prompt strong { font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 400; }
.welcome-prompt span { color: var(--muted); font-size: 13px; }
.welcome-start { width: 100%; text-align: center; }

@keyframes welcome-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-height: 720px) {
  .welcome-compass { margin-bottom: 16px; }
  .welcome-emotion { height: 78px; }
  .welcome-intro h1 { font-size: 38px; }
  .welcome-prompt { padding-block: 12px; }
}

@media (max-width: 360px) {
  .app-header { padding-inline: 51px; }
  .app-header .app-brand { grid-template-columns: 24px minmax(0, auto); gap: 6px; }
  .brand-mark { width: 24px; height: 24px; transform: scale(.8); transform-origin: center; }
  .app-header .app-brand-copy strong { font-size: 21px; }
  .app-header .app-brand-copy span { font-size: 9.5px; }
  .screen { padding-inline: 19px; }
  .base-feeling { min-height: 98px; padding-inline: 16px; font-size: 23px; }
}

/* Чёткая структура интенсивности в таблице и выборе оттенков */
.shade-accordion.fear,
.dictionary-group.fear { --group-color: var(--fear); }
.shade-accordion.anger,
.dictionary-group.anger { --group-color: var(--anger); }
.shade-accordion.sadness,
.dictionary-group.sadness { --group-color: var(--sadness); }
.shade-accordion.joy,
.dictionary-group.joy { --group-color: var(--joy); }

.dictionary-group > h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 27px;
}

.dictionary-group > h3::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: var(--group-color);
}

.shade-level {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--group-color) 14%, var(--line));
  border-radius: 17px;
}

.shade-level.level-soft {
  background: color-mix(in srgb, var(--group-color) 5%, rgba(255, 251, 244, .92));
}

.shade-level.level-medium {
  background: color-mix(in srgb, var(--group-color) 10%, rgba(255, 251, 244, .92));
}

.shade-level.level-strong {
  background: color-mix(in srgb, var(--group-color) 17%, rgba(255, 251, 244, .92));
}

.shade-level h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 11px;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}

.shade-level h4::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--group-color);
}

.shade-level.level-soft h4::before { opacity: .42; }
.shade-level.level-medium h4::before { opacity: .7; }
.shade-level.level-strong h4::before { opacity: 1; }
.shade-level h4 span { font-size: 14px; font-weight: 500; }
.shade-level h4 small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
}

.shade-level .feeling-options,
.dictionary-words {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dictionary-word > .choice,
.shade-choice-wrap > .shade-option {
  width: 100%;
  min-height: 48px;
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, var(--group-color) 18%, var(--line));
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(74, 61, 48, .045);
  font-size: 13px;
  line-height: 1.25;
}

.dictionary-word > .choice {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  background: rgba(255, 251, 244, .84);
  text-align: left;
}

.dictionary-word > .choice::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--group-color);
  opacity: .62;
}

.dictionary-word > .choice:hover,
.shade-choice-wrap > .shade-option:hover {
  border-color: var(--group-color);
  filter: saturate(1.08);
}

.dictionary-word > .choice.selected,
.shade-choice-wrap > .shade-option.selected {
  border-color: var(--group-color);
  outline: 2px solid color-mix(in srgb, var(--group-color) 62%, var(--ink));
  outline-offset: 1px;
}

.shade-choice-wrap.definition-open,
.dictionary-word.definition-open { grid-column: 1 / -1; }

.inline-definition {
  border-left-color: var(--group-color, var(--joy));
  background: rgba(255, 251, 244, .9);
}

@media (max-width: 380px) {
  .shade-level .feeling-options,
  .dictionary-words { grid-template-columns: 1fr; }
}
