/* Shared mini-program brand: yellow welcome, cream search, quiet resource lists. */
:root {
  --sun: #ffd84c;
  --sun-soft: #fff5cc;
  --canvas: #fffdf7;
  --surface: #fffefb;
  --ink: #28291f;
  --muted: #6a685a;
  --line: #e7dfc7;
  --field: #f7f2e4;
  --control-line: #948d75;
  --danger: #a2382b;
  --radius: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family:
    'PingFang SC',
    'Microsoft YaHei',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  scrollbar-color: #b9ad84 var(--canvas);
  font-size: 16px;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body[data-screen='home'],
body[data-screen='pocket'] {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
body.dialog-open {
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
  transition:
    background-color 160ms,
    color 160ms;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
select,
summary {
  outline-offset: 3px;
}
input {
  caret-color: var(--ink);
}
:focus-visible {
  outline: 2px solid #696023;
}
::selection {
  background: var(--sun);
  color: var(--ink);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
h1 {
  letter-spacing: -0.025em;
  line-height: 1.3;
}
p {
  text-wrap: pretty;
}
img {
  max-width: 100%;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  vertical-align: middle;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.content-width {
  width: min(1000px, calc(100% - 64px));
  margin-inline: auto;
}
.brand-dot {
  color: #967300;
}
.site-header {
  flex: 0 0 72px;
  min-height: 72px;
  width: min(1120px, calc(100% - 64px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 20px;
  font-weight: 750;
  white-space: nowrap;
}
.brand img {
  width: 40px;
  height: 40px;
}
.site-header nav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.site-header nav a {
  padding: 8px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 14px;
  color: var(--muted);
}
.site-header nav a[aria-current] {
  background: var(--sun);
  color: var(--ink);
  font-weight: 650;
}
.site-header nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
}
.nav-count {
  font-size: 12px;
  min-width: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
main {
  flex: 1;
  min-height: 0;
  outline: none;
}

.home {
  position: relative;
  padding: 0 32px;
  isolation: isolate;
}
.home::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 316px;
  background: var(--sun);
}
.home-search {
  width: min(960px, 100%);
  margin-inline: auto;
}
.home-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  min-height: 278px;
  padding: 24px 32px 20px;
}
.home-copy {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.home-copy h1 {
  white-space: nowrap;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.home-copy p {
  margin-inline: auto;
  color: #514819;
  font-size: 15px;
  margin-top: 16px;
}
.mascot-greeting {
  position: relative;
  width: 240px;
  height: 240px;
  flex-shrink: 0;
  padding: 8px;
  border-radius: 16px;
}
.home-mascot {
  width: 100%;
}
.greeting-note {
  position: absolute;
  top: 4px;
  right: -12px;
  z-index: 1;
  border-radius: 10px;
  background: var(--surface);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
  transform: rotate(4deg);
  transition:
    transform 160ms var(--ease),
    color 160ms;
}
.mascot-greeting:hover .greeting-note,
.mascot-greeting:focus-visible .greeting-note,
.mascot-greeting.is-greeted .greeting-note {
  color: var(--ink);
  transform: rotate(0deg);
}
.home-search-card {
  background: var(--canvas);
  padding: 28px 32px 16px;
  border-radius: 16px;
  box-shadow: 0 10px 32px rgba(89, 72, 24, 0.07);
}
.home-recent {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.home-recent h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 8px;
}
.home-recent h2 .icon {
  width: 18px;
  height: 18px;
}
.recent-searches {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: thin;
}
.recent-query {
  display: block;
  flex: 0 0 auto;
  max-width: min(16em, 65vw);
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 8px;
  background: var(--field);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 160ms var(--ease);
}
.recent-query:hover {
  background: var(--sun);
}
.recent-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 44px;
}
.search-form {
  position: relative;
  margin: 0;
}
.search-card-label {
  display: block;
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 16px;
}
.search-control {
  display: flex;
  align-items: stretch;
  gap: 12px;
}
.search-field {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 12px;
  padding-left: 18px;
  background: #f5f2e9;
  border: 1px solid var(--control-line);
  border-radius: 10px;
}
.search-field > .icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
}
.search-field:hover {
  border-color: #6f7369;
}
.search-field:focus-within {
  border-color: #70621f;
  outline: 1px solid #70621f;
}
.search-control input {
  width: 0;
  min-width: 0;
  flex: 1;
  border: 0;
  background: none;
  height: 54px;
  font-size: 16px;
  padding: 0;
  outline: none;
}
.search-control input::-webkit-search-cancel-button {
  display: none;
}
.search-control input::placeholder,
.pocket-filter input::placeholder {
  color: var(--muted);
}
.search-control input:focus-visible {
  outline: none;
}
.primary,
.secondary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 650;
  font-size: 14px;
}
.primary {
  background: var(--ink);
  color: var(--surface);
}
.primary:hover {
  background: #434535;
}
.secondary {
  background: var(--sun-soft);
  color: var(--ink);
}
.secondary:hover {
  background: var(--sun);
}
.search-submit {
  white-space: nowrap;
  min-width: 148px;
  min-height: 56px;
  margin: 0;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 10px;
  font-size: 16px;
  transition:
    background-color 120ms,
    transform 120ms var(--ease);
}
.search-submit .icon {
  width: 19px;
  height: 19px;
  color: var(--sun);
}
.search-submit:hover:not(:disabled) {
  background: #434535;
}
.search-submit:active:not(:disabled) {
  transform: scale(0.98);
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  padding: 10px;
}
.icon-button:hover {
  background: var(--field);
}
.input-clear {
  padding: 10px;
}
.input-clear .icon {
  width: 18px;
  height: 18px;
}
.form-error {
  font-size: 13px;
  color: var(--danger);
  min-height: 22px;
  margin-top: 8px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
}
.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 650;
}
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 4px;
  font-size: 13px;
  color: var(--muted);
}
.text-button:hover:not(:disabled) {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-button .icon {
  width: 17px;
  height: 17px;
}
.site-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 6px 24px;
  color: var(--muted);
  font-size: 12px;
}
.site-footer > div {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 24px;
  flex-wrap: wrap;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}
.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-200%);
  padding: 12px 20px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 8px;
}
.skip-link:focus {
  transform: none;
}
.results {
  padding-top: 28px;
  padding-bottom: 36px;
}
.results-top {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.results-search {
  display: flex;
  justify-content: center;
  padding: 8px 0 32px;
}
.is-compact {
  width: min(860px, 100%);
  min-width: 0;
}
.results-search .form-error:empty {
  display: none;
}
.results-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.results-heading > div:first-child {
  flex: 1;
  min-width: 0;
}
.results-heading h1 {
  font-size: 22px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.search-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-shrink: 0;
}
#search-status:not(:empty) {
  margin-top: 14px;
}
.results-top .progress-strip,
.results-top .result-notice {
  margin: 0;
}
.results-top .result-notice {
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}
.results-top .result-notice .icon {
  margin-top: 2px;
}
#results-body > .result-toolbar {
  margin-top: 0;
}
.expand-search {
  background: var(--sun);
  min-width: 156px;
}
.expand-search:hover:not(:disabled) {
  background: #f5cc38;
}
.expand-search:disabled {
  opacity: 1;
  background: var(--field);
  color: var(--muted);
}
.expand-search .icon {
  width: 18px;
  height: 18px;
}
.progress-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--field);
  padding: 4px 16px 4px 4px;
  border-radius: 12px;
  min-height: 72px;
  margin-bottom: 16px;
}
.status-mascot {
  width: 64px;
  flex: 0 0 64px;
}
.progress-strip strong {
  font-size: 14px;
}
.progress-strip p {
  font-size: 13px;
  color: var(--muted);
}
.progress-strip .text-button {
  margin-left: auto;
  white-space: nowrap;
}
.result-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 16px 0;
}
.result-toolbar p {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--muted);
}
.result-toolbar strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.result-toolbar p > span {
  font-size: 12px;
}
.provider-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: min(100%, 280px);
}
.provider-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}
.provider-filter span {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.provider-filter:hover {
  background: var(--sun-soft);
  border-color: #aa8420;
}
.provider-filter[aria-pressed='true'] {
  background: var(--sun);
  border-color: var(--sun);
  font-weight: 650;
}
.result-group {
  margin-top: 24px;
}
.result-group .section-heading {
  padding: 12px 16px;
  background: var(--sun-soft);
  border-radius: 8px;
}
.group-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.resource-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.resource-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 24px;
  border-bottom: 1px solid var(--line);
  padding: 16px;
  background: var(--surface);
}
.resource-card:hover {
  background: #fff9e6;
}
.resource-title {
  grid-column: 1;
  grid-row: 1;
  padding: 0;
  text-align: left;
  min-height: 28px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.resource-title:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.resource-meta {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.provider {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}
.provider .icon {
  width: 14px;
  height: 14px;
}
.resource-actions {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.favorite .icon {
  width: 19px;
  height: 19px;
}
.favorite.is-saved .icon {
  fill: var(--sun);
  stroke: var(--ink);
}
.get-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
}
.get-link:hover {
  background: var(--sun-soft);
  border-color: #8c792e;
}
.get-link .icon {
  width: 16px;
  height: 16px;
}
.result-end {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  align-items: center;
  padding-top: 28px;
}
.expand-search-bottom {
  min-width: 216px;
  min-height: 52px;
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 12px;
}
.error-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff0e6;
  color: var(--danger);
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
}
.error-panel p {
  font-size: 14px;
  margin-top: 4px;
}
.error-panel .secondary {
  margin-left: auto;
  flex-shrink: 0;
}
.result-notice {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  margin: 16px 0;
}
.result-notice .icon {
  width: 18px;
  height: 18px;
}
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 24px 16px;
}
.empty-mascot {
  width: 128px;
  margin-bottom: 8px;
}
.empty-state h2 {
  font-size: 18px;
  margin-bottom: 8px;
  font-weight: 600;
}
.empty-state p {
  color: var(--muted);
  font-size: 14px;
}
.empty-state .secondary {
  margin-top: 20px;
}
.skeleton-grid {
  display: grid;
  gap: 1px;
}
.skeleton-grid > div {
  height: 96px;
  background: var(--field);
}
.pocket-page {
  --pocket-row-height: 96px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) 48px;
  padding-top: 20px;
  padding-bottom: 0;
  overflow: hidden;
}
.pocket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 28px;
  background: var(--sun);
  border-radius: 16px;
  min-height: 116px;
  margin-bottom: 16px;
}
.pocket-header h1 {
  font-size: 30px;
  font-weight: 800;
}
.local-note {
  color: #514819;
  font-size: 12px;
  margin-top: 6px;
}
.pocket-cloud {
  width: 104px;
  height: 104px;
  object-fit: contain;
  flex-shrink: 0;
}
.pocket-tabs {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--line);
}
.pocket-tabs button {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 10px 10px 0 0;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  color: var(--muted);
}
.pocket-tabs button[aria-selected='true'] {
  background: var(--sun-soft);
  border-color: #aa8420;
  color: var(--ink);
  font-weight: 650;
}
.pocket-tabs button span {
  font-size: 12px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.pocket-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}
.pocket-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--control-line);
  border-radius: 8px;
  width: min(300px, 100%);
}
.pocket-filter input {
  border: 0;
  outline: none;
  min-width: 0;
  min-height: 42px;
  background: none;
  width: 100%;
  font-size: 14px;
}
.pocket-filter:focus-within {
  outline: 2px solid #70621f;
  outline-offset: 2px;
}
.pocket-filter .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.pocket-tools > .text-button {
  margin-left: auto;
  flex-shrink: 0;
}
#pocket-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
#pocket-body:focus-visible {
  outline-offset: -2px;
}
.pocket-page .resource-card {
  height: var(--pocket-row-height);
  padding-block: 8px;
}
.pocket-page .empty-state {
  min-height: 100%;
}
.pocket-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
#pocket-page-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.history-list > a {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  height: var(--pocket-row-height);
  padding: 12px 16px;
}
.history-list > a > span {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.history-list > a:hover {
  background: var(--field);
}
.history-list .icon {
  color: var(--muted);
  width: 18px;
}
.reading-page {
  max-width: 800px;
  padding-top: 30px;
  padding-bottom: 64px;
}
.back-link {
  margin-bottom: 28px;
}
.back-link .icon {
  transform: rotate(180deg);
}
.reading-page h1 {
  font-size: 38px;
  max-width: 680px;
}
.reading-intro {
  color: var(--muted);
  margin-top: 16px;
}
.help-list {
  margin: 36px 0;
}
.help-list details {
  border-bottom: 1px solid var(--line);
}
.help-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  padding: 24px 0;
  font-size: 17px;
  font-weight: 650;
  list-style: none;
}
.help-list summary::-webkit-details-marker {
  display: none;
}
.help-list summary .icon {
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
}
.help-list details[open] summary .icon {
  transform: none;
}
.help-list details p {
  padding-bottom: 26px;
  max-width: 70ch;
  color: var(--muted);
  line-height: 1.9;
  font-size: 15px;
}
.prose {
  margin: 40px 0;
}
.prose h2 {
  font-size: 21px;
  margin: 32px 0 12px;
}
.prose p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 70ch;
}
.reading-cta {
  margin-top: 16px;
}
.about-intro {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 30px 0;
}
.about-mascot {
  width: 170px;
  flex-shrink: 0;
}
.about-intro p {
  line-height: 1.9;
  font-size: 16px;
  color: var(--muted);
}
dialog {
  padding: 0;
  border: 0;
  max-width: calc(100% - 32px);
  width: 570px;
  max-height: calc(100dvh - 48px);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px #28291f40;
  overflow: auto;
}
dialog::backdrop {
  background: rgba(40, 41, 31, 0.45);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px 8px;
}
.dialog-tag {
  background: var(--sun);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 650;
}
.dialog-body {
  padding: 12px 28px 24px;
}
.dialog-body h2 {
  margin: 15px 0 24px;
  font-size: 23px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.prepare-feedback {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px 22px;
  border-radius: 12px;
  background: var(--canvas);
  text-align: center;
}
.prepare-mascot {
  width: 136px;
}
.prepare-feedback h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.prepare-feedback p {
  color: var(--muted);
  font-size: 14px;
}
.prepare-hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}
.prepared-success {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--field);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 18px;
  font-size: 14px;
}
.direct-notice {
  margin: 0 0 16px;
}
.detail-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}
.share-url {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: var(--field);
  border: 1px solid var(--line);
  font-size: 14px;
  min-height: 46px;
}
.password-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.password-row > span {
  color: var(--muted);
  flex-shrink: 0;
}
.password-row strong {
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.password-row .text-button {
  margin-left: auto;
  flex-shrink: 0;
}
.detail-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
}
.external-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.external-link .icon {
  width: 16px;
  height: 16px;
}
.dialog-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px 28px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.dialog-actions .primary {
  flex: 1;
}
.dialog-actions .secondary {
  background: var(--sun-soft);
}
.prepare-action {
  padding: 0 28px 18px;
  text-align: center;
}
#prepare-status {
  color: var(--muted);
  font-size: 14px;
}
#prepare-status:not(:empty) {
  margin: 15px 0;
  padding: 12px;
  background: var(--sun-soft);
  border-radius: 8px;
}
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  max-width: calc(100% - 40px);
  width: max-content;
  background: var(--ink);
  color: var(--surface);
  padding: 13px 24px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 10px 30px #28291f26;
  pointer-events: none;
}
.noscript {
  padding: 30px;
  text-align: center;
  color: var(--danger);
}

.dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
}
dialog > .toast {
  position: sticky;
  bottom: 0;
  left: auto;
  transform: none;
  margin: 0 auto 16px;
  max-width: calc(100% - 32px);
  font-size: 13px;
}
@media (max-width: 760px) {
  .content-width,
  .site-header {
    width: calc(100% - 32px);
  }
  .site-header {
    flex-basis: 60px;
    min-height: 60px;
    gap: 12px;
  }
  .brand {
    font-size: 17px;
    gap: 0;
  }
  .brand img {
    width: 34px;
    height: 34px;
  }
  .site-header nav {
    gap: 4px;
  }
  .site-header nav a {
    padding-inline: 12px;
    font-size: 13px;
  }
  .home {
    padding: 0 16px;
  }
  .home::before {
    height: 222px;
  }
  .home-intro {
    display: grid;
    grid-template-columns: 1fr 128px;
    min-height: 198px;
    padding: 20px 8px 12px;
    column-gap: 4px;
    row-gap: 8px;
  }
  .home-copy {
    display: contents;
  }
  .home-copy h1 {
    grid-column: 1 / -1;
    text-align: center;
    font-size: clamp(24px, 6.8vw, 36px);
  }
  .home-copy p {
    font-size: 12px;
    grid-column: 1;
    grid-row: 2;
    max-width: none;
    margin: 0;
    text-align: center;
  }
  .mascot-greeting {
    grid-column: 2;
    grid-row: 2;
    width: 120px;
    height: 120px;
    padding: 0;
    margin-right: -4px;
  }
  .greeting-note {
    top: -6px;
    right: 0;
    padding: 4px 8px;
    font-size: 12px;
  }
  .home-search-card {
    padding: 20px 18px 12px;
    border-radius: 14px;
  }
  .search-card-label {
    font-size: 15px;
    margin-bottom: 14px;
  }
  .home .search-control {
    flex-direction: column;
    gap: 12px;
  }
  .search-field {
    padding-left: 12px;
    gap: 8px;
  }
  .search-control input {
    height: 50px;
    font-size: 16px;
  }
  .search-field > .icon {
    width: 18px;
    height: 18px;
  }
  .search-submit {
    min-height: 52px;
    min-width: 84px;
    padding-inline: 14px;
    font-size: 15px;
  }
  .home .search-submit {
    position: relative;
  }
  .home .search-submit .icon {
    position: absolute;
    right: 16px;
  }
  .is-compact .search-submit .icon {
    display: none;
  }
  .site-footer {
    min-height: 52px;
    padding: 4px 16px;
  }
  .site-footer > div {
    column-gap: 20px;
  }
  .copyright {
    display: none;
  }
  .results {
    padding-top: 16px;
  }
  .results-top {
    padding-bottom: 16px;
    margin-bottom: 16px;
  }
  .results-search {
    padding: 4px 0 24px;
  }
  .results-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .results-heading h1 {
    font-size: 19px;
  }
  .search-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 12px;
  }
  .expand-search {
    min-width: 164px;
  }
  .result-toolbar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .result-toolbar p {
    font-size: 13px;
  }
  .provider-filters {
    flex-basis: 100%;
  }
  .provider-filter {
    padding-inline: 12px;
  }
  .expand-search-bottom {
    min-width: 216px;
  }
  .result-group {
    margin-top: 20px;
  }
  .result-group .section-heading {
    padding: 10px 12px;
  }
  .resource-card {
    padding: 14px 4px;
    column-gap: 8px;
  }
  .resource-title {
    font-size: 15px;
  }
  .resource-actions {
    gap: 0;
  }
  .get-link {
    padding: 8px;
    font-size: 12px;
  }
  .get-link .icon {
    display: none;
  }
  .resource-meta {
    gap: 10px;
    font-size: 12px;
  }
  .resource-meta .provider .icon {
    display: none;
  }
  .progress-strip {
    gap: 6px;
    padding-right: 8px;
  }
  .status-mascot {
    width: 52px;
    flex-basis: 52px;
  }
  .progress-strip p {
    font-size: 12px;
  }
  .progress-strip .text-button {
    font-size: 12px;
  }
  .error-panel {
    flex-wrap: wrap;
    padding: 16px;
  }
  .error-panel > div {
    flex: 1;
    min-width: 0;
  }
  .error-panel .secondary {
    margin-left: 36px;
  }
  .pocket-page {
    --pocket-row-height: 108px;
    padding-top: 12px;
    grid-template-rows: auto auto auto minmax(0, 1fr) 48px;
  }
  .pocket-header {
    gap: 4px;
    min-height: 96px;
    margin-bottom: 12px;
    padding: 8px 14px;
  }
  .pocket-header h1 {
    font-size: 25px;
  }
  .local-note {
    font-size: 12px;
    max-width: 18em;
  }
  .pocket-cloud {
    width: 80px;
    height: 80px;
  }
  .pocket-tabs {
    justify-content: space-between;
    gap: 8px;
  }
  .pocket-tabs button {
    font-size: 13px;
    gap: 6px;
  }
  .pocket-tools {
    padding: 12px 0;
    gap: 12px;
  }
  .pocket-filter {
    flex: 1;
    min-width: 0;
    max-width: 300px;
  }
  .pocket-pagination {
    gap: 4px;
    font-size: 12px;
  }
  #pocket-page-actions {
    gap: 8px;
  }
  .pocket-pagination .text-button {
    font-size: 12px;
  }
  .pocket-page .empty-state {
    padding: 16px 8px;
  }
  .pocket-page .empty-state p {
    font-size: 13px;
  }
  .history-list > a {
    padding-inline: 4px;
    font-size: 14px;
  }
  .reading-page {
    padding: 15px 0 40px;
  }
  .reading-page h1 {
    font-size: 29px;
  }
  .reading-intro {
    font-size: 14px;
  }
  .back-link {
    margin-bottom: 20px;
  }
  .help-list {
    margin-top: 20px;
  }
  .help-list summary {
    font-size: 15px;
    padding: 20px 0;
  }
  .help-list details p {
    font-size: 14px;
  }
  .prose p {
    font-size: 15px;
  }
  .about-intro {
    gap: 12px;
    align-items: start;
    flex-direction: column;
  }
  .about-mascot {
    width: 130px;
  }
  .about-intro p {
    font-size: 15px;
  }
  dialog {
    max-width: calc(100% - 24px);
    max-height: calc(100dvh - 32px);
    border-radius: 16px;
  }
  .dialog-header {
    padding: 14px 16px 5px;
  }
  .dialog-body {
    padding: 12px 20px 18px;
  }
  .dialog-body h2 {
    font-size: 20px;
  }
  .dialog-actions {
    padding: 15px 20px;
    gap: 8px;
  }
  .dialog-actions .primary,
  .dialog-actions .secondary {
    padding-inline: 12px;
    font-size: 13px;
  }
  .toast {
    bottom: 20px;
    padding: 12px 16px;
    font-size: 13px;
  }
}
@media (max-height: 560px) {
  .site-header {
    flex-basis: 48px;
    min-height: 48px;
  }
  .site-footer {
    min-height: 40px;
    padding-block: 0;
  }
  .home {
    padding-inline: 16px;
  }
  .home::before {
    height: 144px;
  }
  .home-intro {
    display: flex;
    min-height: 112px;
    padding: 8px 16px;
    gap: 16px;
  }
  .home-copy {
    display: block;
  }
  .home-copy h1 {
    font-size: clamp(24px, 3.6vw, 30px);
  }
  .home-recent {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 0;
    padding-top: 4px;
  }
  .home-recent h2 {
    flex-shrink: 0;
    margin: 0;
    font-size: 13px;
  }
  .recent-searches {
    min-width: 0;
  }
  .recent-query {
    font-size: 13px;
  }

  .home-copy p {
    font-size: 12px;
    max-width: none;
    margin-top: 6px;
  }
  .mascot-greeting {
    width: 96px;
    height: 96px;
    margin-right: 24px;
    padding: 0;
  }
  .greeting-note {
    right: -20px;
    top: 0;
  }
  .home-search-card {
    padding: 12px 20px 0;
  }
  .search-card-label {
    font-size: 14px;
    margin-bottom: 8px;
  }
  .home .search-control {
    flex-direction: row;
  }
  .home .search-submit {
    min-width: 112px;
  }
  .home .search-submit .icon {
    position: static;
  }
  .form-error {
    margin-top: 4px;
    font-size: 12px;
  }
  .pocket-page {
    padding-top: 0;
    --pocket-row-height: 92px;
  }
  .pocket-header {
    min-height: 56px;
    margin-bottom: 4px;
    padding: 4px 16px;
  }
  .pocket-header h1 {
    font-size: 20px;
  }
  .pocket-header .local-note {
    display: none;
  }
  .pocket-cloud {
    width: 48px;
    height: 48px;
  }
  .pocket-tabs button {
    min-height: 40px;
    padding-block: 6px;
  }
  .pocket-tools {
    padding-block: 6px;
  }
  .pocket-page .empty-state {
    padding: 4px;
  }
  .pocket-page .empty-state .secondary {
    margin-top: 8px;
  }
}
@media (max-width: 600px) and (max-height: 560px) {
  .home-intro {
    display: grid;
    grid-template-columns: 1fr 80px;
    row-gap: 0;
  }
  .home-copy {
    display: contents;
  }
  .mascot-greeting {
    width: 64px;
    height: 64px;
    margin-right: 0;
  }
  .home-recent {
    gap: 8px;
  }
  .home-recent h2 {
    gap: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .search-submit:active:not(:disabled) {
    transform: none;
  }
  .greeting-note {
    transform: none;
  }
}

.group-toggle {
  width: 100%;
  justify-content: center;
  min-height: 44px;
  margin-top: 8px;
}
.group-toggle .icon {
  width: 16px;
  height: 16px;
  transform: rotate(90deg);
}
.group-toggle[aria-expanded='true'] .icon {
  transform: rotate(-90deg);
}
