:root {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: #18222f;
  background:
    radial-gradient(circle at top, rgba(242, 111, 61, 0.18), transparent 32%),
    linear-gradient(180deg, #fffaf3 0%, #f8f1e4 100%);
  color-scheme: light;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --bg-soft: rgba(255, 255, 255, 0.66);
  --surface: rgba(255, 252, 247, 0.82);
  --surface-strong: rgba(255, 248, 238, 0.96);
  --surface-warm: rgba(255, 245, 234, 0.96);
  --ink-soft: #53616f;
  --ink-faint: #73808e;
  --ink-strong: #1f2a36;
  --line: rgba(24, 34, 47, 0.1);
  --accent: #f26f3d;
  --accent-deep: #ca572d;
  --accent-wash: rgba(242, 111, 61, 0.16);
  --gold: #f0c15b;
  --mint: #88c6b0;
  --sky: #8ab6e6;
  --shadow: 0 18px 45px rgba(86, 58, 34, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
}

body.is-modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 0 0 calc(10px + env(safe-area-inset-bottom));
}

.app-frame {
  position: relative;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background: rgba(255, 250, 243, 0.72);
  box-shadow: none;
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.app-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 42%),
    repeating-linear-gradient(
      180deg,
      transparent 0,
      transparent 35px,
      rgba(24, 34, 47, 0.016) 36px,
      rgba(24, 34, 47, 0.016) 37px
    );
  pointer-events: none;
}

.topbar,
.screen-area,
.bottom-nav,
.toast {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 8px;
}

.topbar-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.eyebrow,
.label,
.reward-state {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.ghost-button,
.secondary-button,
.text-button,
.pill,
.nav-item {
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.ghost-button {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-strong);
  border: 1px solid rgba(24, 34, 47, 0.08);
}

.ghost-button.is-disabled {
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink-soft);
  cursor: default;
}

.screen-area {
  padding: 6px 14px 100px;
}

.screen {
  display: grid;
  gap: 14px;
  animation: screen-in 320ms ease;
}

.hero-panel {
  padding: 19px;
  border-radius: 20px;
  background:
    linear-gradient(150deg, rgba(242, 111, 61, 0.95), rgba(236, 168, 78, 0.88)),
    var(--surface-strong);
  color: #fff9f2;
  box-shadow: 0 14px 28px rgba(190, 104, 35, 0.18);
}

.hero-panel h2 {
  margin: 10px 0 12px;
  font-size: clamp(1.8rem, 8vw, 2.7rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-kicker {
  line-height: 1.15;
}

.hero-kicker,
.hero-copy,
.section-head p,
.history-row p,
.reward-card p,
.profile-line span {
  margin: 0;
}

.hero-copy,
.section-head p,
.history-row p,
.reward-card p {
  color: rgba(255, 249, 242, 0.84);
}

.hero-actions,
.daily-focus,
.section-head,
.profile-stack,
.history-list,
.field,
.card-grid,
.mentor-notes,
.mentor-panel,
.mentor-actions,
.settings-form {
  display: grid;
  gap: 12px;
}

.primary-button,
.secondary-button,
.save-button {
  min-height: 52px;
  border-radius: 18px;
  padding: 14px 18px;
  margin: 1px 0;
}

.primary-button {
  background: #fff8ee;
  color: var(--accent-deep);
  font-weight: 700;
}

.connect-cta-button {
  border: 1px solid rgba(177, 66, 20, 0.28);
  background: linear-gradient(180deg, #ff955e 0%, #f26f3d 54%, #d85b2e 100%);
  color: #fffaf2;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 28px rgba(216, 91, 46, 0.24);
}

.connect-cta-button:hover,
.connect-cta-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(216, 91, 46, 0.28);
}

.save-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(155, 63, 27, 0.26);
  background: linear-gradient(180deg, #ff8d57 0%, #f26f3d 52%, #d85b2e 100%);
  color: #fffdf8;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(120, 43, 16, 0.24);
  box-shadow:
    0 18px 28px rgba(216, 91, 46, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.save-button:hover,
.save-button:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 22px 34px rgba(216, 91, 46, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.secondary-button {
  background: rgba(255, 248, 238, 0.18);
  color: #fff8ee;
  border: 1px solid rgba(255, 248, 238, 0.26);
}

.daily-focus,
.progress-band,
.screen-log,
.screen-history,
.screen-profile {
  padding: 14px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.stats-strip {
  display: grid;
  gap: 10px;
}

.stats-strip-primary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-pill {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(24, 34, 47, 0.06);
}

.stat-pill strong,
.stat-line strong {
  font-size: 1rem;
  line-height: 1.15;
  overflow-wrap: break-word;
}

.stats-strip-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}

.stat-line {
  min-width: 0;
  padding: 10px 0 12px;
  border-bottom: 1px solid rgba(24, 34, 47, 0.08);
}

.daily-focus {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0;
}

.daily-focus div {
  min-width: 0;
  padding: 10px 0 12px;
  border-bottom: 1px solid rgba(24, 34, 47, 0.08);
}

.daily-focus strong,
.progress-copy strong,
.bar-column strong,
.history-row strong,
.profile-line strong {
  font-size: 1rem;
  line-height: 1.15;
  overflow-wrap: break-word;
}

.progress-band {
  display: grid;
  gap: 10px;
  padding: 4px 0 0;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(24, 34, 47, 0.08);
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #f1be53);
}

.progress-note,
.field,
.section-head p,
.history-row p,
.profile-line span,
.field span {
  color: var(--ink-soft);
}

.field-hint,
.profile-note {
  margin: 0;
  color: var(--ink-faint);
  line-height: 1.35;
}

.mini-timeline {
  display: grid;
  gap: 12px;
}

.section-head {
  align-items: end;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.15;
}

.text-button {
  justify-self: start;
  padding: 0;
  background: transparent;
  color: var(--accent-deep);
  font-weight: 700;
}

.timeline-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: end;
  min-height: 112px;
}

.bar-column {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.bar-fill {
  width: 100%;
  max-width: 28px;
  border-radius: 999px 999px 12px 12px;
  background: linear-gradient(180deg, #f3c057 0%, #f26f3d 100%);
  box-shadow: 0 8px 18px rgba(242, 111, 61, 0.24);
}

.field {
  gap: 10px;
}

.field span {
  color: var(--ink-soft);
  font-weight: 700;
}

.field-static {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  min-height: 48px;
  display: flex;
  align-items: center;
}

select,
textarea,
input[type="text"],
input[type="range"] {
  width: 100%;
}

select,
textarea,
input[type="text"] {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: #23303d;
}

textarea {
  resize: vertical;
}

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

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

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  border: 1px solid transparent;
}

.pill.is-active {
  background: var(--accent);
  color: white;
}

.card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

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

.cards-hero {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 248, 238, 0.84);
  border: 1px solid rgba(24, 34, 47, 0.06);
}

.cards-hero-copy {
  display: grid;
  gap: 6px;
}

.cards-hero-copy h3,
.cards-hero-copy p {
  margin: 0;
}

.cards-hero-copy h3 {
  font-size: 1.3rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.cards-hero-copy p:last-child {
  color: var(--ink-soft);
}

.album-chip {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

.album-chip span {
  font-size: 1.2rem;
}

.album-chip strong {
  font-size: 0.82rem;
}

.album-chip.is-locked {
  opacity: 0.6;
  filter: grayscale(0.3);
}

.reward-card {
  min-height: 188px;
  padding: 12px;
  border-radius: 18px;
  display: grid;
  align-content: start;
  gap: 6px;
  color: #1f2a36;
  box-shadow: 0 10px 18px rgba(59, 65, 75, 0.06);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(24, 34, 47, 0.06);
}

.reward-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.1;
  color: var(--ink-strong);
}

.reward-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(58px);
  align-items: start;
  gap: 6px;
  padding-right: 2px;
}

.reward-rarity {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink-strong);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  justify-self: end;
}

.reward-symbol {
  position: absolute;
  top: 50px;
  right: 14px;
  font-size: 1.65rem;
  line-height: 1;
  color: rgba(31, 42, 54, 0.88);
  opacity: 0.72;
}

.reward-copy {
  display: grid;
  gap: 6px;
  max-width: calc(100% - 60px);
  padding-top: 26px;
}

.reward-progress {
  color: rgba(31, 42, 54, 0.72);
  font-weight: 700;
  line-height: 1.2;
}

.reward-card p {
  color: rgba(31, 42, 54, 0.8);
  overflow-wrap: break-word;
  line-height: 1.18;
}

.reward-award-note {
  margin-top: 6px;
}

.reward-award-note {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(31, 42, 54, 0.08);
  font-style: normal;
  line-height: 1.45;
  color: rgba(31, 42, 54, 0.78);
}

.reward-award-note span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(31, 42, 54, 0.56);
}

.reward-award-note strong {
  font-size: 0.88rem;
  color: rgba(31, 42, 54, 0.88);
}

.reward-award-note p {
  margin: 0;
  color: rgba(31, 42, 54, 0.78);
}

.reward-state {
  min-width: 0;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  line-height: 1.08;
  max-width: none;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
  text-wrap: balance;
}

.reward-card.is-locked {
  opacity: 0.6;
  filter: saturate(0.8);
}

.reward-card.is-unlocked::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 380px) {
  .stats-strip-primary,
  .stats-strip-secondary {
    grid-template-columns: 1fr;
  }

  .card-grid {
    gap: 8px;
  }

  .reward-card {
    min-height: 178px;
    padding: 12px;
  }

  .reward-copy {
    max-width: calc(100% - 54px);
    padding-top: 24px;
  }

  .reward-card h3 {
    font-size: 0.95rem;
  }

  .reward-rarity {
    font-size: 0.58rem;
  }

  .reward-symbol {
    right: 12px;
    font-size: 1.5rem;
  }
}

.accent-apricot {
  background: linear-gradient(180deg, #ffe2d3, #ffc7ad);
}

.accent-gold {
  background: linear-gradient(180deg, #ffeebf, #f4cf74);
}

.accent-sky {
  background: linear-gradient(180deg, #dbe9f8, #b7d4f0);
}

.accent-mint {
  background: linear-gradient(180deg, #def4ea, #b6e1cf);
}

.history-row,
.profile-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(24, 34, 47, 0.08);
}

.history-row {
  align-items: flex-start;
}

.history-row div,
.profile-line span,
.profile-line strong {
  min-width: 0;
}

.history-row span,
.profile-line strong {
  text-align: right;
}

.history-row:last-child,
.profile-line:last-child {
  border-bottom: 0;
}

.mentor-panel {
  padding: 6px 0 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.mentor-card {
  padding: 12px 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft);
  border: 0;
  border-bottom: 1px solid rgba(24, 34, 47, 0.08);
}

.mentor-card strong {
  display: block;
  margin-bottom: 6px;
  color: #1f2a36;
}

.mentor-card p {
  margin: 0;
  line-height: 1.3;
}

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

.feedback-panel,
.feedback-question-list {
  display: grid;
  gap: 12px;
}

.feedback-question-card {
  gap: 10px;
}

.feedback-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.feedback-scale-button {
  border: 1px solid rgba(24, 34, 47, 0.1);
  border-radius: 14px;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-strong);
  font-weight: 700;
}

.feedback-scale-button.is-active {
  background: rgba(242, 111, 61, 0.14);
  border-color: rgba(242, 111, 61, 0.34);
  color: var(--accent-deep);
}

.feedback-scale-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.feedback-note.is-error {
  color: #9a3d2d;
}

.feedback-submit-button {
  background: linear-gradient(180deg, #5b86b6, #436b98);
  color: #fffaf3;
  border: 1px solid rgba(43, 68, 96, 0.9);
  box-shadow: 0 12px 22px rgba(67, 107, 152, 0.28);
  cursor: pointer;
}

.feedback-submit-button:hover,
.feedback-submit-button:focus-visible {
  background: linear-gradient(180deg, #678fbc, #4a739f);
  box-shadow: 0 14px 24px rgba(67, 107, 152, 0.32);
}

.feedback-submit-button:disabled {
  background: linear-gradient(180deg, #d7e2ee, #c7d5e4);
  color: rgba(31, 42, 54, 0.6);
  border-color: rgba(24, 34, 47, 0.1);
  box-shadow: none;
  cursor: default;
}

.settings-dialog {
  width: min(92vw, 520px);
  max-height: calc(100vh - 32px);
  border: 0;
  padding: 0;
  background: transparent;
  margin: auto;
}

.settings-dialog::backdrop {
  background: rgba(31, 42, 54, 0.34);
  backdrop-filter: blur(6px);
}

.settings-sheet {
  display: grid;
  gap: 14px;
  padding: 18px;
  box-sizing: border-box;
  border-radius: 22px;
  background: rgba(255, 249, 241, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 28px rgba(31, 42, 54, 0.14);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.settings-block {
  display: grid;
  gap: 10px;
  padding: 0 0 14px;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(24, 34, 47, 0.08);
}

.settings-block-danger {
  border-bottom-color: rgba(166, 61, 47, 0.16);
}

.settings-block h3 {
  margin: 0;
  font-size: 1rem;
}

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

.help-step {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(24, 34, 47, 0.08);
}

.help-step:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.help-step strong,
.help-step p {
  margin: 0;
}

.help-step p {
  color: var(--ink-soft);
  line-height: 1.35;
}

.settings-copy,
.settings-status {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.4;
}

.share-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 8px;
  border: 1px solid rgba(24, 34, 47, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 14px;
}

.share-qr-image {
  width: 112px;
  height: 112px;
  border-radius: 14px;
  background: #fff;
  padding: 8px;
  border: 1px solid rgba(24, 34, 47, 0.08);
}

.share-card-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.profile-connection-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(24, 34, 47, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.profile-connection-card p,
.profile-connection-card small {
  margin: 0;
}

.profile-connection-card small {
  color: var(--ink-soft);
}

.share-url {
  display: block;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(242, 111, 61, 0.08);
  color: var(--ink);
  font-size: 0.88rem;
}

.settings-status[data-state="ready"] {
  color: #176c43;
}

.settings-status[data-state="error"] {
  color: #a63d2f;
}

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

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

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

.settings-choice-block {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(31, 42, 54, 0.08);
}

.settings-choice-block strong,
.settings-choice-block p {
  margin: 0;
}

.scanner-shell {
  display: grid;
  gap: 12px;
}

.scanner-stage {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: 240px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 58%),
    linear-gradient(145deg, #132233, #22344a);
  border: 1px solid rgba(24, 34, 47, 0.08);
}

.scanner-stage.is-error {
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.14), transparent 58%),
    linear-gradient(145deg, #4d1f1f, #6b2d25);
}

.scanner-video {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  display: block;
}

.scanner-frame {
  position: absolute;
  inset: 18px;
  border-radius: 20px;
  border: 2px solid rgba(255, 250, 243, 0.8);
  box-shadow:
    0 0 0 999px rgba(6, 14, 21, 0.24),
    inset 0 0 0 1px rgba(24, 34, 47, 0.08);
  pointer-events: none;
}

.settings-field {
  gap: 8px;
}

.confirm-summary {
  display: grid;
  gap: 10px;
}

.confirm-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(24, 34, 47, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.confirm-card-danger {
  border-color: rgba(166, 61, 47, 0.2);
  background: rgba(255, 244, 242, 0.92);
}

.confirm-card p {
  margin: 0;
}

.profile-sync-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(24, 34, 47, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.profile-sync-card p,
.profile-sync-card small {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.4;
}

.profile-sync-card.tone-ok {
  border-color: rgba(27, 123, 79, 0.22);
  background: rgba(27, 123, 79, 0.09);
}

.profile-sync-card.tone-pending,
.profile-sync-card.tone-running {
  border-color: rgba(242, 111, 61, 0.24);
  background: rgba(242, 111, 61, 0.1);
}

.profile-sync-card.tone-error {
  border-color: rgba(166, 61, 47, 0.24);
  background: rgba(255, 244, 242, 0.92);
}

.compact-help-list {
  gap: 8px;
}

.compact-help-list .help-step {
  padding: 10px 12px;
}

.sync-status-list {
  display: grid;
  gap: 10px;
}

.sync-status-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(24, 34, 47, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.sync-status-item strong,
.sync-status-item span {
  display: block;
}

.sync-status-item span {
  color: var(--ink-soft);
  white-space: nowrap;
}

.sync-status-item.is-running {
  border-color: rgba(242, 111, 61, 0.24);
  background: rgba(242, 111, 61, 0.1);
}

.sync-status-item.is-done {
  border-color: rgba(27, 123, 79, 0.22);
  background: rgba(27, 123, 79, 0.09);
}

.sync-status-item.is-error {
  border-color: rgba(166, 61, 47, 0.24);
  background: rgba(255, 244, 242, 0.92);
}

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

.settings-file-label {
  display: grid;
  place-items: center;
  text-align: center;
}

.secondary-action {
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-deep);
  font-weight: 700;
  border: 1px solid rgba(24, 34, 47, 0.08);
}

.sync-action {
  background: linear-gradient(145deg, #f26f3d, #dc5d30);
  color: #fffaf3;
  border-color: rgba(220, 93, 48, 0.22);
  box-shadow: 0 14px 24px rgba(220, 93, 48, 0.2);
}

.sync-action[disabled] {
  background: rgba(242, 111, 61, 0.24);
  color: rgba(255, 250, 243, 0.82);
  border-color: rgba(220, 93, 48, 0.14);
  box-shadow: none;
}

.primary-action {
  background: var(--accent);
  color: #fffaf3;
  border-color: transparent;
}

.danger-action {
  background: linear-gradient(145deg, #c7523e, #a63d2f);
  color: #fff8f3;
  border-color: rgba(166, 61, 47, 0.26);
  box-shadow: 0 14px 24px rgba(166, 61, 47, 0.2);
}

.share-action {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-deep);
  font-weight: 700;
  border: 1px solid rgba(24, 34, 47, 0.08);
}

.bottom-nav {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(252, 247, 240, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 20px rgba(70, 47, 27, 0.08);
}

.nav-item {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 2px;
  border-radius: 14px;
  background: transparent;
  color: var(--ink-faint);
}

.nav-item span {
  font-size: 1.1rem;
}

.nav-item strong {
  font-size: 0.72rem;
  line-height: 1.1;
}

.nav-item.is-active {
  background: var(--accent-wash);
  color: var(--accent-deep);
  transform: translateY(-2px);
}

.toast {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 104px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #1f2a36;
  color: #fff9f2;
  box-shadow: 0 14px 28px rgba(31, 42, 54, 0.24);
  animation: toast-in 320ms ease;
}

.is-celebrating .hero-panel {
  animation: pulse 520ms ease;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.015);
  }
}

@media (min-width: 700px) {
  .app-shell {
    display: grid;
    place-items: center;
    padding: 14px;
  }

  .app-frame {
    width: 420px;
    min-height: 860px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow);
  }
}

@media (max-width: 380px) {
  .screen-area {
    padding: 6px 12px 96px;
  }

  .topbar {
    padding: 14px 12px 8px;
  }

  .hero-panel,
  .daily-focus,
  .progress-band,
  .screen-log,
  .screen-history,
  .screen-profile,
  .mentor-panel {
    padding: 0;
    border-radius: 0;
  }

  .hero-panel h2 {
    font-size: 1.55rem;
  }

  .daily-focus {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cards-hero {
    padding: 12px;
    border-radius: 16px;
  }

  .daily-focus strong,
  .progress-copy strong,
  .history-row strong,
  .profile-line strong {
    font-size: 0.95rem;
  }

  .history-row,
  .profile-line {
    gap: 10px;
    padding: 12px 0;
  }

  .history-row p,
  .profile-line span,
  .section-head p,
  .mentor-card p {
    font-size: 0.92rem;
  }

  .bottom-nav {
    left: 8px;
    right: 8px;
    bottom: 12px;
    gap: 4px;
    padding: 8px;
  }

  .nav-item {
    gap: 4px;
    padding: 8px 2px;
  }

  .nav-item strong {
    font-size: 0.66rem;
  }

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

  .topbar-actions,
  .settings-actions {
    grid-template-columns: 1fr;
  }

  .share-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .topbar-actions {
    justify-items: stretch;
  }
}

@media (max-width: 520px) {
  .settings-dialog {
    width: calc(100vw - 12px);
    max-width: 420px;
    max-height: calc(100vh - 12px);
  }

  .settings-sheet {
    gap: 12px;
    padding: 14px 12px;
    border-radius: 18px;
    max-height: calc(100vh - 12px);
  }

  .settings-block {
    gap: 8px;
    padding-bottom: 12px;
  }

  .help-list,
  .compact-help-list {
    gap: 6px;
  }

  .help-step,
  .compact-help-list .help-step {
    padding: 8px 10px;
  }
}
