:root {
  --ink: #1c211c;
  --ink-soft: #3a4138;
  --mute: #6d7568;
  --line: rgba(28, 33, 28, 0.12);
  --paper: #e4e7e1;
  --paper-2: #eef0eb;
  --surface: #f6f7f4;
  --moss: #2f5d50;
  --moss-deep: #214338;
  --tip: #dfe8e2;
  --danger-soft: #f0e2da;
  --shadow-soft: 0 18px 40px rgba(28, 33, 28, 0.12);
  --radius: 18px;
  --topbar-h: 58px;
  --bottombar-h: 72px;
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Outfit", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 12% -8%, #cfd9d0 0%, transparent 55%),
    radial-gradient(900px 500px at 92% 0%, #d5ddd8 0%, transparent 50%),
    linear-gradient(165deg, #c8cec7 0%, #bec6bf 50%, #b4bbb4 100%);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

/* —— Device frame (desktop) —— */
.device {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.app {
  width: min(100%, 390px);
  height: min(844px, calc(100dvh - 32px));
  background: var(--surface);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(28, 33, 28, 0.08);
  display: grid;
  grid-template-rows: var(--topbar-h) 1fr var(--bottombar-h);
  isolation: isolate;
}

.app::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(28, 33, 28, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 33, 28, 0.015) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.topbar,
.content,
.bottombar,
.sheet {
  position: relative;
  z-index: 1;
}

/* —— Top bar (fixed shell) —— */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar__back[hidden] {
  display: none !important;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.icon-btn:hover {
  background: rgba(28, 33, 28, 0.06);
}

.icon-btn:active {
  transform: scale(0.96);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.search__icon {
  color: var(--mute);
  flex: 0 0 auto;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 450;
}

.search input::placeholder {
  color: var(--mute);
}

/* —— Content —— */
.content {
  overflow: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  background:
    linear-gradient(180deg, var(--surface) 0%, var(--paper-2) 100%);
}

.view {
  padding: 8px 18px 28px;
  animation: viewIn 0.42s var(--ease) both;
}

.view[hidden] {
  display: none !important;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Home —— */
.home-hero {
  padding: 14px 0 14px;
}

.home-hero__eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 550;
}

.home-hero__brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.35rem, 9vw, 2.85rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.home-hero__lede {
  margin: 12px 0 0;
  max-width: 28ch;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink-soft);
  font-weight: 360;
}

.featured {
  margin: 4px 0 28px;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  animation: rise 0.55s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.featured__hit {
  display: block;
  width: 100%;
  text-align: left;
  color: var(--ink);
}

.featured__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.7s var(--ease);
}

.featured__hit:hover .featured__img {
  transform: scale(1.04);
}

.featured__meta {
  padding: 14px 16px 16px;
  background: var(--surface);
}

.featured__label {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 550;
  margin-bottom: 6px;
}

.featured__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.featured__sub {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--mute);
  font-weight: 360;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 12px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.section-head__count {
  font-size: 0.85rem;
  color: var(--mute);
  font-weight: 450;
}

.section-head--row {
  margin-top: 26px;
}

.collections {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.collections::-webkit-scrollbar {
  display: none;
}

.collection {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 12px;
  border-radius: 0;
  background: transparent;
  color: var(--mute);
  font-size: 0.92rem;
  font-weight: 450;
  position: relative;
  transition: color 0.2s var(--ease);
}

.collection::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: transparent;
  transition: background 0.2s var(--ease);
}

.collection.is-active {
  color: var(--ink);
  font-weight: 550;
}

.collection.is-active::after {
  background: var(--moss);
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-row-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  align-items: center;
  animation: rise 0.5s var(--ease) both;
}

.project-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  margin: 0;
  border-radius: 14px;
  text-align: left;
  width: 100%;
  transition: background 0.2s var(--ease);
}

.project-row__delete {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--mute);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.project-row__delete:hover {
  background: rgba(140, 60, 50, 0.1);
  color: #8c3c32;
}

.btn--danger {
  background: transparent;
  color: #8c3c32;
  border: 1px solid rgba(140, 60, 50, 0.35);
  margin-top: 12px;
}

.btn--danger:hover {
  background: rgba(140, 60, 50, 0.08);
}

.detail__delete {
  margin-top: 14px;
}

.menu__item--danger {
  color: #8c3c32;
}

.project-row:nth-child(1) { animation-delay: 0.05s; }
.project-row:nth-child(2) { animation-delay: 0.1s; }
.project-row:nth-child(3) { animation-delay: 0.15s; }
.project-row:nth-child(4) { animation-delay: 0.2s; }
.project-row:nth-child(5) { animation-delay: 0.25s; }
.project-row:nth-child(6) { animation-delay: 0.3s; }

.project-row:hover {
  background: rgba(28, 33, 28, 0.04);
}

.project-row__thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--paper);
}

.project-row__body h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.project-row__body p {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--mute);
  font-weight: 360;
}

.project-row__chev {
  color: var(--mute);
  font-size: 1.1rem;
  padding-right: 4px;
}

/* —— Detail —— */
.detail {
  padding-bottom: 8px;
}

.detail__media {
  margin: 0 -18px 18px;
  aspect-ratio: 1 / 0.92;
  overflow: hidden;
  background: var(--paper);
  animation: rise 0.5s var(--ease) both;
}

.detail__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.detail__meta {
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.9rem;
  color: var(--mute);
}

.detail__meta strong {
  color: var(--ink-soft);
  font-weight: 550;
}

.detail__block {
  margin-top: 26px;
}

.detail__block h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
}

.materials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.materials li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.materials__empty,
.steps__empty {
  color: var(--mute);
  border-bottom: 0;
  padding: 14px 0;
}

.materials__check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid color-mix(in srgb, var(--moss) 55%, var(--line));
  background: var(--surface);
  position: relative;
}

.materials__item.is-done .materials__check {
  background: var(--moss);
  border-color: var(--moss);
}

.materials__item.is-done .materials__check::after {
  content: "";
  position: absolute;
  inset: 5px 4px 6px 5px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: rotate(40deg);
}

.materials__body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 0;
  background: none;
}

.materials__item.is-done .materials__name {
  text-decoration: line-through;
  color: var(--mute);
}

.materials__name {
  font-weight: 450;
}

.materials__aka {
  color: var(--mute);
  font-size: 0.82rem;
  font-weight: 360;
  text-align: right;
  max-width: 14ch;
}

.make-progress {
  margin: 0 0 16px;
  color: var(--mute);
  font-size: 0.9rem;
}

.make-step {
  min-height: 160px;
  padding: 8px 0 20px;
}

.make-step strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 650;
  margin-bottom: 12px;
  line-height: 1.2;
}

.make-step p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.make-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--ink-soft);
}

.steps strong {
  display: block;
  font-weight: 550;
  margin-bottom: 2px;
}

.steps span {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.4;
  font-weight: 360;
}

.tip {
  margin-top: 26px;
  padding: 14px 14px 14px 16px;
  background: var(--tip);
  border-radius: 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.tip__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--moss-deep);
  line-height: 1;
  margin-top: 2px;
}

.tip p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.tip strong {
  color: var(--ink);
  font-weight: 550;
}

.notes {
  margin-top: 18px;
  width: 100%;
  text-align: left;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent);
  background: transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.notes:hover {
  background: rgba(28, 33, 28, 0.03);
  border-color: color-mix(in srgb, var(--ink) 35%, transparent);
}

.notes__label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 550;
  margin-bottom: 6px;
}

.notes__placeholder {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-weight: 360;
  line-height: 1.35;
}

.detail__actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  font-weight: 550;
  font-size: 0.92rem;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--moss);
  color: #f4f7f4;
}

.btn--primary:hover {
  background: var(--moss-deep);
}

.btn--ghost {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}

/* —— Bottom bar —— */
.bottombar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  padding: 8px 22px calc(8px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--mute);
  font-size: 0.7rem;
  font-weight: 450;
  padding: 4px;
  transition: color 0.2s var(--ease);
}

.nav-item:first-child {
  justify-self: start;
  padding-left: 10px;
}

.nav-item:last-child {
  justify-self: end;
  padding-right: 10px;
}

.nav-item.is-active {
  color: var(--ink);
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--moss);
  color: #f4f7f4;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  box-shadow: 0 10px 22px rgba(47, 93, 80, 0.28);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.fab:hover {
  background: var(--moss-deep);
}

.fab:active {
  transform: scale(0.94);
}

.fab__plus {
  width: 18px;
  height: 18px;
  position: relative;
}

.fab__plus::before,
.fab__plus::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 2px;
}

.fab__plus::before {
  width: 18px;
  height: 2px;
  top: 8px;
  left: 0;
}

.fab__plus::after {
  width: 2px;
  height: 18px;
  left: 8px;
  top: 0;
}

/* —— Import sheet —— */
.sheet {
  position: absolute;
  inset: 0;
  z-index: 20;
}

.sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(28, 33, 28, 0.42);
  animation: fadeIn 0.25s var(--ease) both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 12px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(28, 33, 28, 0.18);
  animation: sheetUp 0.35s var(--ease) both;
  max-height: min(92dvh, 820px);
  overflow: auto;
}

.sheet__panel--tall {
  max-height: min(94dvh, 900px);
}

@keyframes sheetUp {
  from {
    transform: translateY(24%);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(28, 33, 28, 0.18);
  margin: 0 auto 14px;
}

.sheet__panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sheet__lede {
  margin: 8px 0 18px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 360;
}

.import-channels {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.channel {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid transparent;
  text-align: left;
  transition: border-color 0.2s var(--ease), transform 0.15s var(--ease);
}

.channel:hover {
  border-color: color-mix(in srgb, var(--moss) 35%, transparent);
}

.channel:active {
  transform: scale(0.985);
}

.channel__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--moss-deep);
  font-size: 1rem;
}

.channel__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.channel__text strong {
  font-weight: 550;
  font-size: 0.98rem;
}

.channel__text small {
  color: var(--mute);
  font-size: 0.82rem;
  font-weight: 360;
}

.channel.is-current {
  border-color: color-mix(in srgb, var(--moss) 45%, transparent);
}

.text-btn {
  color: var(--moss-deep);
  font-weight: 550;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.muted {
  color: var(--mute);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0 0 12px;
}

.empty-hint {
  margin: 18px 0 0;
  color: var(--mute);
  font-size: 0.92rem;
  line-height: 1.4;
}

.detail__collection,
.detail__source {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.detail__source a {
  color: var(--moss-deep);
}

.btn--block {
  width: 100%;
  margin-top: 4px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 450;
  color: var(--ink-soft);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  padding: 12px 12px;
  font: inherit;
  color: var(--ink);
  outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: color-mix(in srgb, var(--moss) 55%, transparent);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

/* —— Menu —— */
.menu {
  position: absolute;
  inset: 0;
  z-index: 30;
}

.menu__scrim {
  position: absolute;
  inset: 0;
  background: transparent;
}

.menu__panel {
  position: absolute;
  top: calc(var(--topbar-h) - 4px);
  right: 12px;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow-soft);
  animation: fadeIn 0.18s var(--ease) both;
  display: flex;
  flex-direction: column;
}

.menu__item {
  text-align: left;
  padding: 12px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 450;
  color: var(--ink);
}

.menu__item:hover {
  background: rgba(28, 33, 28, 0.05);
}

/* —— Profile —— */
.profile {
  padding-top: 12px;
}

.profile__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.profile__lede {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.4;
  font-weight: 360;
  max-width: 34ch;
}

.profile__block {
  margin-top: 28px;
}

.profile__block h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
}

.profile__list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  border-top: 1px solid var(--line);
}

.profile__list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.profile__list span {
  color: var(--mute);
  font-weight: 360;
}

.assign-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* —— Toast —— */
.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(var(--bottombar-h) + 12px);
  z-index: 40;
  background: var(--ink);
  color: var(--surface);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 450;
  text-align: center;
  animation: sheetUp 0.28s var(--ease) both;
  box-shadow: var(--shadow-soft);
}

.detail__title-btn {
  display: block;
  width: 100%;
  text-align: left;
}

.materials__item {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.15s var(--ease);
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 10px;
}

.materials__item:active {
  background: rgba(47, 93, 80, 0.08);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.photo-busy {
  margin-top: 14px;
  text-align: center;
}

.voice-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.voice-bar .btn {
  flex: 0 0 auto;
  padding: 0 16px;
  height: 42px;
}

.voice-status {
  font-size: 0.88rem;
  color: var(--mute);
  font-weight: 450;
}

.glossary-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.glossary-option {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid transparent;
}

.glossary-option small {
  color: var(--mute);
  font-size: 0.82rem;
}

.glossary-option.is-selected {
  border-color: color-mix(in srgb, var(--moss) 50%, transparent);
  background: color-mix(in srgb, var(--moss) 10%, var(--surface));
}

.field input[type="file"] {
  padding: 10px;
}

/* —— Print / PDF —— */
.print-root {
  display: none;
}

@media print {
  @page {
    margin: 16mm;
  }

  body {
    background: #fff !important;
  }

  body * {
    visibility: hidden !important;
  }

  .print-root,
  .print-root * {
    visibility: visible !important;
  }

  .print-root {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0;
    color: #111;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.45;
  }

  .print-root h1 {
    font-size: 22pt;
    margin: 0 0 8px;
  }

  .print-root .print-meta {
    color: #444;
    margin: 0 0 18px;
    font-size: 11pt;
  }

  .print-root h2 {
    font-size: 14pt;
    margin: 18px 0 8px;
  }

  .print-root li {
    margin: 4px 0;
  }

  .print-root .print-tip {
    margin-top: 16px;
    padding: 10px 12px;
    border: 1px solid #ccc;
  }

  .device {
    display: none !important;
  }
}

/* —— Mobile full bleed —— */
@media (max-width: 480px) {
  .device {
    padding: 0;
    place-items: stretch;
  }

  .app {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
