/* Extension packs: a web rebuild of the app's pack pages (ExtensionViews.swift) in the
   "典藏金" gold theme — a live pack page in a phone, and the pack cards beside it. */

.gold {
  --g-bg: #F4EFE3; --g-deep: #7A5A14; --g-card: rgba(255, 252, 244, .8); --g-card-solid: #FFFCF4;
  --g-label: #1D1D1F; --g-label2: rgba(60, 60, 67, .6); --g-sep: rgba(60, 60, 67, .16);
  --g-medallion: radial-gradient(circle at 30% 30%, #F6DE9E, #C9982F 60%, #9C6F17);
}
@media (prefers-color-scheme: dark) {
  .gold { --g-bg: #17140E; --g-deep: #E9C77B; --g-card: rgba(42, 36, 26, .8); --g-card-solid: #2A241A;
    --g-label: #F5F5F7; --g-label2: rgba(235, 235, 245, .6); --g-sep: rgba(84, 84, 88, .6); }
}
.serif { font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, "Times New Roman", serif; }

.packs-grid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .packs-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; } }

/* Pack cards (ExtensionsListView), on the gold ground */
.pack-list { border-radius: 32px; padding: 20px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; background: var(--g-bg); box-shadow: var(--shadow); }
.pack-list::before, .pack-list::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.pack-list::before { width: 340px; height: 340px; left: -120px; top: -160px; background: #E0B866; opacity: .5; filter: blur(70px); }
.pack-list::after { width: 320px; height: 320px; right: -120px; bottom: -140px; background: #C98F3A; opacity: .3; filter: blur(80px); }
.pack-list > * { position: relative; }
.pack-list .sub { margin: 0 4px; font-size: 15px; color: var(--g-label2); }
.pack-list .soon { margin: 4px 4px 0; font-size: 13px; font-weight: 600; color: var(--g-label2); }
.pack-card {
  display: block; width: 100%; text-align: left; font: inherit; color: var(--g-label); cursor: pointer;
  padding: 18px; border-radius: 28px; background: var(--g-card); border: 1px solid rgba(255, 255, 255, .7);
  transition: transform .15s ease, box-shadow .15s ease;
}
.pack-card:hover { transform: translateY(-2px); }
.pack-card[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--g-deep); }
.pack-card:focus-visible { outline: 3px solid var(--g-deep); outline-offset: 2px; }
.pack-card .top { display: flex; align-items: center; gap: 14px; }
.medal { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--g-medallion);
  color: #4A3408; font-size: 30px; font-weight: 900; box-shadow: 0 4px 6px rgba(90, 60, 10, .5); }
.pack-card h3 { margin: 0; font-size: 21px; font-weight: 900; line-height: 1.2; }
.pack-card .en { display: block; margin-top: 2px; font-size: 11px; font-weight: 800; letter-spacing: 1.4px; color: var(--g-deep); text-transform: uppercase; }
.pack-card .chev { margin-left: auto; color: var(--g-deep); font-weight: 800; font-size: 18px; }
.pack-card p { margin: 12px 0; font-size: 13px; color: var(--g-label2); }
.pack-card .cats { display: flex; flex-wrap: wrap; gap: 6px; }
.pack-card .cats span { padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--g-deep); background: color-mix(in srgb, var(--g-deep) 12%, transparent); }

/* The pack page inside the phone (PackDetailView) */
.gp {
  position: absolute; left: 0; top: 0; width: 393px; height: 852px; transform-origin: 0 0; overflow: hidden;
  background: var(--g-bg); color: var(--g-label);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif; font-size: 16px; line-height: 1.3;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.gp :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
.gp .rnd { font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.gp-glow i { position: absolute; border-radius: 50%; pointer-events: none; }
.gp-glow i:nth-child(1) { width: 340px; height: 340px; left: calc(50% - 170px - 110px); top: calc(50% - 170px - 330px); background: #E0B866; opacity: .5; filter: blur(70px); }
.gp-glow i:nth-child(2) { width: 320px; height: 320px; left: calc(50% - 160px + 150px); top: calc(50% - 160px + 200px); background: #C98F3A; opacity: .3; filter: blur(80px); }
.gp-status { position: absolute; left: 0; right: 0; top: 0; height: 54px; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 44px; font-size: 17px; font-weight: 600; }
.gp-status svg { height: 13px; fill: currentColor; }
.gp-island { position: absolute; left: 50%; top: 11px; width: 126px; height: 37px; margin-left: -63px; border-radius: 20px; background: #000; z-index: 4; }
.gp-home { position: absolute; left: 50%; bottom: 8px; width: 139px; height: 5px; margin-left: -70px; border-radius: 3px; background: var(--g-label); z-index: 4; }
.gp-nav { position: absolute; left: 0; right: 0; top: 54px; height: 44px; z-index: 3; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--g-bg) 80%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.gp-nav b { font-size: 17px; font-weight: 600; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-nav .back { position: absolute; left: 8px; max-width: 92px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 2px; color: var(--g-deep); font-size: 17px; }
.gp-nav .back svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.gp-scroll { position: absolute; left: 0; right: 0; top: 98px; bottom: 0; overflow-y: auto; padding: 16px 16px 40px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: none; }
.gp-scroll::-webkit-scrollbar { display: none; }

.gp-seg { display: flex; padding: 2px; border-radius: 9px; background: rgba(118, 118, 128, .12); flex: none; }
.gp-seg button { flex: 1; height: 28px; border-radius: 7px; font-size: 13px; font-weight: 500; }
.gp-seg button.on { background: var(--g-card-solid); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }
.gp-variants { display: flex; gap: 8px; overflow-x: auto; flex: none; scrollbar-width: none; padding: 1px; }
.gp-variants::-webkit-scrollbar { display: none; }
.gp-variants button { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 14px; border-radius: 999px; color: var(--g-deep);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--g-deep) 40%, transparent); }
.gp-variants button.on { background: var(--g-medallion); color: #3A2806; box-shadow: none; }
.gp-variants b { font-size: 15px; font-weight: 900; }
.gp-variants small { font-size: 10px; font-weight: 600; white-space: nowrap; }

.gp-card { border-radius: 26px; padding: 18px; background: var(--g-card); }
.gp-in { display: flex; align-items: baseline; gap: 8px; }
.gp-in input { font: 800 50px/1.1 ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif; color: inherit; background: transparent; border: 0; outline: 0; padding: 0; width: 1ch; min-width: 1ch; max-width: 230px; caret-color: #C9982F; font-variant-numeric: tabular-nums; }
.gp-unit { display: flex; align-items: center; gap: 4px; color: var(--g-deep); font-size: 24px; font-weight: 900; position: relative; }
.gp-unit svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.gp-basis { margin-top: 8px; font-size: 12px; color: var(--g-label2); }
.gp-menu { position: absolute; z-index: 10; width: 220px; border-radius: 14px; overflow: hidden; background: var(--g-card-solid); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); animation: gp-pop .18s ease; }
@keyframes gp-pop { from { opacity: 0; transform: scale(.95); } }
.gp-menu button { display: flex; justify-content: space-between; width: 100%; height: 44px; padding: 0 16px; font-size: 16px; border-bottom: .5px solid var(--g-sep); text-align: left; }
.gp-menu button:last-child { border-bottom: 0; }
.gp-menu button b { font-weight: 800; color: var(--g-deep); }

.gp-h { font-size: 13px; font-weight: 700; color: var(--g-label2); margin-bottom: 8px; }
.gp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.gp-grid button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px; border-radius: 16px; background: color-mix(in srgb, var(--g-card-solid) 70%, transparent); min-width: 0; }
.gp-grid b { font-size: 16px; font-weight: 900; }
.gp-grid span { font-size: 15px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-modern div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: .5px solid var(--g-sep); font-size: 16px; }
.gp-modern b { font-size: 20px; font-weight: 800; color: var(--g-deep); white-space: nowrap; }
.gp-bars button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px 0; }
.gp-bars .n { width: 52px; text-align: left; font-size: 14px; font-weight: 900; white-space: nowrap; overflow: hidden; }
.gp-bars .t { flex: 1; height: 14px; border-radius: 7px; background: color-mix(in srgb, var(--g-deep) 10%, transparent); overflow: hidden; }
.gp-bars .t i { display: block; height: 100%; border-radius: 7px; background: #C9A45C; transition: width .35s ease; }
.gp-bars .on .t i { background: linear-gradient(90deg, #C9982F, #F0522E); }
.gp-bars .v { width: 84px; text-align: right; font-size: 12px; font-weight: 800; white-space: nowrap; }
.gp-note { border-radius: 24px; padding: 16px; background: linear-gradient(135deg, rgba(233, 211, 160, .55), var(--g-card)); display: flex; flex-direction: column; gap: 6px; }
.gp-note .t { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--g-deep); }
.gp-note .t svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.gp-note q { quotes: none; font-size: 17px; font-weight: 900; }
.gp-note p { margin: 0; font-size: 13px; }
.gp-note button { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--g-deep); }
.gp-disc { font-size: 11px; color: var(--g-label2); }
