:root {
  color-scheme: light;
  --bg: #f5f7f6;
  --surface: #ffffff;
  --soft: #f1f4f2;
  --soft-2: #f8f9f8;
  --ink: #111820;
  --muted: #6f7a83;
  --line: #e1e6e2;
  --accent: #2d8b6a;
  --accent-soft: #e7f4ee;
  --danger: #d65248;
  --gold: #dca930;
  --shadow: 0 10px 26px rgba(18, 28, 40, 0.07);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans TC", "Microsoft JhengHei", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

body.dark {
  color-scheme: dark;
  --bg: #15191d;
  --surface: #20262c;
  --soft: #283038;
  --soft-2: #232a31;
  --ink: #f7f9fb;
  --muted: #a7b0bb;
  --line: #34404a;
  --accent-soft: #243c34;
  --shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

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

button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea,
select {
  width: 100%;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft-2);
  color: var(--ink);
  outline: none;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 104px;
  resize: vertical;
  padding: 12px;
  line-height: 1.55;
}

[hidden] {
  display: none !important;
}

.mobile-shell {
  position: relative;
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 94px;
  background: var(--bg);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 66px;
  display: grid;
  grid-template-columns: 42px 1fr 46px;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
}

.icon-button {
  width: 38px;
  height: 38px;
  text-align: left;
  color: var(--ink);
  font-size: 23px;
}

.header-spacer {
  width: 38px;
  height: 38px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.wordmark img,
.app-logo {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
}

.brand-wordmark {
  gap: 8px;
  font-size: 24px;
  font-weight: 900;
}

.brand-wordmark img {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.avatar-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ef3ea4;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7);
}

.screen {
  padding: 18px 20px 10px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.home-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.eyebrow,
.setting-label {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
}

.home-hero h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.15;
}

.stats-summary {
  max-width: 210px;
  margin: 0;
  color: var(--muted);
  text-align: right;
  font-size: 12px;
  line-height: 1.5;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 48px;
  gap: 10px;
  align-items: center;
}

.search-box {
  position: relative;
}

.search-box span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 19px;
}

.search-box input {
  height: 50px;
  padding-left: 42px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.square-button {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 18px;
  box-shadow: var(--shadow);
}

.filter-block {
  margin-top: 16px;
}

.filter-block.compact {
  margin-top: 8px;
}

.filter-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filter-title button {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 2px;
}

.chip-row button {
  flex: 0 1 auto;
  min-width: 70px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.chip-row.small button {
  height: 32px;
  min-width: auto;
  font-size: 12px;
}

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

.chip-row .fold-chip {
  border-color: transparent;
  background: var(--soft);
  color: var(--accent);
}

.chip-row small {
  margin-left: 4px;
  opacity: 0.72;
  font-size: 11px;
}

#regionChips {
  display: grid;
  gap: 8px;
}

.region-chip-control,
.region-chip-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.region-chip-groups {
  display: grid;
  gap: 8px;
}

.region-chip-line {
  width: 100%;
  padding-bottom: 1px;
}

.list-subhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 12px;
}

.subtle-button {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mini-primary {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.collection-list {
  display: grid;
  gap: 10px;
  align-items: stretch;
}

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

.collection-list.grid .save-card {
  padding: 12px;
  height: 100%;
}

.collection-list.grid .card-line {
  grid-template-columns: 24px minmax(0, 1fr) auto;
}

.collection-list.grid .kebab {
  grid-column: 3;
}

.collection-list.grid .card-line time {
  display: none;
}

.collection-list.grid .card-content h2 {
  font-size: 15px;
  -webkit-line-clamp: 3;
}

.collection-list.grid .card-content p {
  -webkit-line-clamp: 3;
}

.collection-list.grid .card-content {
  max-height: 224px;
  overflow: hidden;
}

.collection-list.grid .card-bottom {
  margin-top: auto;
}

.collection-list.compact .save-card {
  padding: 11px 12px;
}

.collection-list.compact .card-content p,
.collection-list.compact .note-preview,
.collection-list.compact .tag-list {
  display: none;
}

.save-card,
.topic-create,
.topic-card,
.settings-card,
.auth-card,
.share-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.save-card {
  padding: 14px;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.save-card * {
  min-width: 0;
}

.card-line {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto 24px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.platform-badge {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 900;
  overflow: hidden;
}

.platform-badge img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.card-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.card-line time {
  color: var(--muted);
  font-size: 12px;
}

.kebab {
  color: var(--muted);
  font-size: 20px;
}

.card-content {
  width: 100%;
  padding: 0;
  display: block;
  text-align: left;
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  margin-bottom: 10px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--soft);
}

.card-content h2 {
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.35;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-content p,
.save-card > p,
.note-preview {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.note-preview {
  margin-top: 8px;
  color: var(--ink);
}

.card-bottom {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.edit-chip {
  width: 28px;
  height: 28px;
  color: var(--muted);
  font-size: 16px;
  flex: 0 0 auto;
}

.category-list-inline,
.region-list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  flex: 1 1 100px;
}

.region-list-inline {
  flex-basis: 100%;
}

.main-pill {
  max-width: 168px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 900;
}

.region-list-inline span {
  max-width: 148px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef4f8;
  color: #3d6983;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 900;
}

body.dark .region-list-inline span {
  background: #26333b;
  color: #9bbdd0;
}

.tag-list,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  flex: 1 1 100%;
}

.tag-list span,
.tag-row span {
  max-width: 120px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}

.empty-message {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.empty-message.inline {
  min-height: 150px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty-symbol {
  color: #cbd2d8;
  font-size: 34px;
}

.empty-message strong {
  color: var(--ink);
  font-size: 18px;
}

.empty-message span {
  max-width: 300px;
  font-size: 13px;
  line-height: 1.55;
}

.page-title {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  margin-bottom: 18px;
}

.page-title h1 {
  margin: 0;
  padding-right: 40px;
  text-align: center;
  font-size: 22px;
}

.back-inline {
  width: 40px;
  height: 40px;
  color: var(--muted);
  font-size: 30px;
}

.topic-create {
  padding: 16px;
  margin-bottom: 10px;
}

.taxonomy-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.taxonomy-tabs button {
  min-height: 38px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.taxonomy-tabs button.active {
  background: var(--accent);
  color: #fff;
}

.taxonomy-panel {
  display: none;
}

.taxonomy-panel.active {
  display: block;
}

.topic-create label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.topic-create div {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 8px;
}

.topic-create .region-create-fields {
  grid-template-columns: minmax(140px, 0.85fr) minmax(150px, 1fr) 92px;
}

.field-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.topic-create button,
.modal button[type="submit"]:not(.modal-close),
.auth-card button {
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.topic-create button {
  min-height: 46px;
  padding: 0 18px;
  font-size: 15px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 16px 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.segmented button {
  height: 34px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.section-heading {
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.page-note {
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.region-tree {
  display: grid;
  gap: 10px;
}

.topic-card {
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: center;
  min-height: 78px;
  padding: 10px 10px 10px 14px;
}

.topic-main {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) minmax(76px, 90px);
  gap: 8px;
  align-items: center;
  text-align: left;
}

.topic-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.topic-main small {
  justify-self: end;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}

.topic-main em {
  grid-column: 2 / -1;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-style: normal;
  font-size: 12px;
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
}

.topic-more {
  height: 42px;
  color: var(--muted);
  font-size: 20px;
}

.region-node {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.region-node-row {
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: center;
  min-height: 72px;
  padding: 10px 10px 10px 14px;
}

.region-node .region-node {
  margin: 0 10px 10px 28px;
  border-style: dashed;
  box-shadow: none;
}

.region-node.depth-1 .color-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
}

.region-node.depth-2 .color-dot {
  width: 8px;
  height: 8px;
  background: var(--muted);
}

.region-main strong {
  font-size: 15px;
}

.trash-empty {
  min-height: 460px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.trash-empty div {
  color: #cbd2d8;
  font-size: 58px;
}

.trash-empty p {
  margin: 6px 0;
  color: var(--gold);
  letter-spacing: 6px;
  font-size: 11px;
}

.trash-empty strong {
  font-size: 22px;
}

.trash-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.trash-actions button {
  height: 38px;
  border-radius: var(--radius);
  background: var(--soft);
  font-weight: 800;
}

.trash-actions .danger {
  background: color-mix(in srgb, var(--danger) 16%, var(--surface));
  color: var(--danger);
}

.settings-section {
  display: grid;
  gap: 14px;
}

.settings-section + .settings-section {
  margin-top: 18px;
}

.settings-card {
  padding: 16px;
}

.settings-card h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.two-buttons,
.three-buttons {
  display: grid;
  gap: 8px;
}

.two-buttons {
  grid-template-columns: 1fr 1fr;
}

.three-buttons {
  grid-template-columns: repeat(3, 1fr);
}

.two-buttons button,
.three-buttons button {
  height: 40px;
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.two-buttons button.active,
.three-buttons button.active {
  background: var(--accent);
  color: #fff;
}

.settings-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.settings-actions button {
  min-height: 44px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.settings-actions button + button {
  background: var(--soft);
  color: var(--ink);
}

.row-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.row-card input {
  width: 46px;
}

.backup-card {
  display: grid;
  gap: 12px;
}

.backup-card h2 {
  margin-bottom: 0;
}

.backup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.backup-actions button {
  min-height: 44px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.backup-actions button + button {
  background: var(--soft);
  color: var(--ink);
}

.backup-status {
  min-height: 18px;
  overflow-wrap: anywhere;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 25;
  width: min(92%, 572px);
  height: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr 62px 1fr 1fr;
  align-items: center;
  padding: 5px 8px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(18px);
}

.nav-item {
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.nav-item span {
  display: block;
  font-size: 18px;
  line-height: 1;
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-add {
  width: 50px;
  height: 50px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(47, 139, 107, 0.22);
}

.scroll-top-button {
  position: fixed;
  z-index: 30;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  font-size: 22px;
  font-weight: 900;
  box-shadow: var(--shadow);
  touch-action: none;
  user-select: none;
}

.scroll-top-button.dragging {
  opacity: 0.82;
  transform: scale(1.04);
}

.popover {
  position: fixed;
  z-index: 45;
  right: auto;
  top: 120px;
  width: min(292px, calc(100vw - 40px));
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.popover button {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border-radius: var(--radius);
  text-align: left;
  font-size: 14px;
}

.popover button.active {
  color: var(--accent);
  font-weight: 900;
}

.popover .danger {
  color: var(--danger);
}

.modal {
  width: min(92vw, 500px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.34);
}

.modal form {
  position: relative;
  display: grid;
  gap: 11px;
  padding: 22px;
}

.modal h2 {
  margin: 0 0 4px;
  font-size: 21px;
}

.modal label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.multi-picker {
  display: grid;
  gap: 7px;
  color: var(--muted);
}

.picker-caption {
  font-size: 11px;
  line-height: 1.3;
}

.multi-picker-row {
  max-height: 112px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  overflow: auto;
  padding: 1px 1px 3px;
  -webkit-overflow-scrolling: touch;
}

.multi-picker-row button,
.picker-more {
  min-height: 34px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.multi-picker-row button.active {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--accent);
  color: #fff;
}

.picker-more {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  color: var(--muted);
  font-size: 24px;
}

.modal button[type="submit"]:not(.modal-close) {
  height: 46px;
  margin-top: 2px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 98px;
  z-index: 60;
  max-width: min(380px, calc(100vw - 40px));
  padding: 10px 14px;
  transform: translateX(-50%);
  border-radius: var(--radius);
  background: #111820;
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow);
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-card {
  width: min(390px, 100%);
  display: grid;
  gap: 12px;
  padding: 24px;
}

.auth-card .app-logo {
  width: 52px;
  height: 52px;
}

.auth-card h1 {
  margin: 0;
  font-size: 24px;
}

.auth-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.auth-card button {
  height: 46px;
}

.form-error {
  min-height: 20px;
  color: var(--danger);
}

.share-page {
  background: var(--bg);
}

.share-shell {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 900;
}

.share-card {
  padding: 20px;
}

.share-card h1 {
  margin: 0 0 10px;
  font-size: 24px;
}

.share-card p {
  line-height: 1.7;
}

.share-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.primary-link {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

@media (max-width: 430px) {
  body {
    font-size: 13px;
  }

  .screen,
  .app-header {
    padding-inline: 14px;
  }

  .home-hero {
    align-items: start;
  }

  .home-hero h1 {
    font-size: 24px;
  }

  .stats-summary {
    max-width: 156px;
  }

  .search-row {
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    gap: 8px;
  }

  .search-box input {
    height: 46px;
  }

  .square-button {
    height: 44px;
  }

  .collection-list.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .collection-list.grid .save-card {
    min-height: 246px;
  }

  .collection-list.grid .card-line strong {
    font-size: 12px;
  }

  .collection-list.grid .main-pill,
  .collection-list.grid .tag-list span {
    max-width: 100%;
    font-size: 11px;
  }

  .collection-list.grid .category-list-inline,
  .collection-list.grid .region-list-inline,
  .collection-list.grid .tag-list {
    flex-basis: 100%;
  }

  .topic-create div {
    grid-template-columns: 1fr;
  }

  .topic-create .region-create-fields {
    grid-template-columns: 1fr;
  }

  .region-node .region-node {
    margin-left: 16px;
    margin-right: 8px;
  }

  .bottom-nav {
    width: calc(100% - 18px);
    grid-template-columns: 1fr 1fr 56px 1fr 1fr;
    padding-inline: 8px;
  }

  .nav-item {
    font-size: 9px;
  }

  .nav-item span {
    font-size: 18px;
  }

  .nav-add {
    width: 48px;
    height: 48px;
  }

  .modal {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 12px);
  }

  .modal form {
    padding: 20px 16px;
  }
}
