:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #433323;
  background: #e8dece;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid #93632e; outline-offset: 4px; }
.page {
  width: min(100%, 430px);
  min-height: 100svh;
  margin: 0 auto;
  background: #f3e9dc;
  box-shadow: 0 0 24px #5e452018;
}
.app-header {
  padding: 24px 22px 16px;
  text-align: center;
  background: linear-gradient(#f5eddfdc, #f3e9dc 95%), url('../assets/quarry-20260916.webp') center 32% / cover;
}
.page-label { margin: 0 0 17px; color: #816338; font-size: 12px; letter-spacing: 3px; }
.app-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 13px;
  padding: 7px;
  border: 1px solid #d9bd8d;
  border-radius: 18px;
  background: #fffaf0;
  box-shadow: 0 5px 12px #8b62231a;
}
.app-icon img { display: block; width: 100%; height: auto; border-radius: 9px; }
h1 { margin: 0; color: #624322; font-size: 28px; font-weight: 700; letter-spacing: 4px; text-indent: 4px; }
.subtitle { margin: 9px 0 21px; color: #7d6b53; font-size: 13px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 340px; margin: 0 auto; }
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 10px 8px;
  border-radius: 24px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid #cba264;
}
.button-gold { color: #62421e; background: linear-gradient(#ffe8b1, #e9bc6c); box-shadow: inset 0 0 0 2px #fff0c3, 0 2px 3px #ab7b3822; }
.button-outline { color: #79582e; background: #fff8ecb3; box-shadow: inset 0 0 0 2px #fffaf2; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .7; cursor: wait; font-size: 12px; }
.download-status { min-height: 36px; margin: 12px 0 0; color: #816f57; font-size: 11px; line-height: 18px; }
.content { padding: 0 14px; }
.card { padding: 15px 13px; margin-bottom: 12px; border: 1px solid #d9c29c; border-radius: 10px; background: #fcf7ef; }
h2 { margin: 0; color: #513d25; font-size: 16px; font-weight: 600; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 13px; }
.section-heading > span { color: #89775e; font-size: 10px; }
.preview-list { display: flex; gap: 11px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #cfb385 transparent; padding: 2px 1px 8px; }
.preview-card { flex: 0 0 144px; border: 0; padding: 0; background: transparent; color: #72593b; scroll-snap-align: start; text-align: center; }
.preview-card img { display: block; width: 144px; height: auto; aspect-ratio: 600 / 1299; border: 1px solid #d1b98e; border-radius: 7px; object-fit: cover; }
.preview-card span { display: block; padding-top: 8px; font-size: 12px; }
.preview-note { margin: 9px 0 0; font-size: 10px; line-height: 17px; color: #8a7c69; }
.intro p { margin: 10px 0 0; color: #77654e; font-size: 13px; line-height: 1.9; }
footer { padding: 8px 14px 25px; text-align: center; color: #96856e; font-size: 11px; }
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 40px); border-radius: 8px; padding: 12px 18px; color: #fff8ed; background: #423526f2; font-size: 13px; line-height: 1.6; opacity: 0; pointer-events: none; z-index: 10; }
.toast.show { opacity: 1; }
dialog { border: 1px solid #d4b781; border-radius: 12px; padding: 0; width: min(94vw, 420px); max-height: 92svh; background: #fcf7ef; color: #513d25; }
dialog::backdrop { background: #211b14cc; }
.dialog-panel header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; gap: 8px; position: sticky; top: 0; background: #fcf7ef; border-bottom: 1px solid #e2d4bf; }
.dialog-panel h2 { font-size: 14px; }
.dialog-panel button { flex-shrink: 0; width: 40px; height: 40px; border: 0; background: transparent; font-size: 27px; color: #725330; }
.dialog-panel > img { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
