/* App source: CardFrame, CardNameplate, CollectibleCardFront and ChapterBadge.
   Exact material stops, paper/ink, aspect ratio and engraved corner geometry. */
.app-collectible { --card-rim: linear-gradient(135deg,#7C7C6F,#E2DDCB,#F8F3E7,#A9A99B,#EEE9D9,#858577); --card-edge:#737669; --card-engraving:#4E5B3D; --card-seal:#53554C; container-type:inline-size; }
.app-collectible[data-card-tier="uncommon"] { --card-rim:linear-gradient(135deg,#244D3D,#789774,#D4DDB8,#355D46,#8BA478,#244D3D); --card-edge:#244D3D; --card-engraving:#997E43; --card-seal:#355D46; }
.app-collectible[data-card-tier="rare"] { --card-rim:linear-gradient(135deg,#416587,#A3C8E1,#F0F7FB,#6F9DBE,#CEE4F3,#456B8D); --card-edge:#416587; --card-engraving:#466E91; --card-seal:#365776; }
.app-collectible[data-card-tier="epic"] { --card-rim:linear-gradient(135deg,#503269,#9D7DBA,#EEE3F5,#69458D,#C3A5DB,#503269); --card-edge:#503269; --card-engraving:#7E609F; --card-seal:#654584; }
.app-collectible[data-card-tier="legendary"] { --card-rim:linear-gradient(135deg,#906316,#E2B65C,#FFF2C3,#BC8930,#F1D48C,#906316); --card-edge:#906316; --card-engraving:#A77C2F; --card-seal:#785517; }
body .app-collectible .card-face.card-front { padding:5px 5px 7px; outline:0; background:var(--card-rim); border-radius:16px; border-bottom:3px solid var(--card-edge); align-items:stretch; }
.landing-page .hero .app-collectible .card-face.card-front { padding:5px 5px 7px; }
.app-card-paper { flex:1; min-height:0; border:.7px solid var(--card-engraving); border-radius:11px; background:#F8F3E7; color:#17211A; display:flex; flex-direction:column; overflow:hidden; }
body .app-collectible .card-front .card-title { font:400 clamp(14px,8.67cqw,26px)/1.15 Gloock,serif; letter-spacing:-.35px; color:#17211A; padding:clamp(10px,6cqw,18px) clamp(10px,8.3cqw,25px) 0; margin:0; flex:none; }
body .app-collectible .card-front .card-category { font:400 clamp(8px,3.33cqw,10px)/1.4 Instrument,sans-serif; color:#4E5B3D; letter-spacing:.3px; padding:5px 15px clamp(7px,4cqw,12px); margin:0; text-transform:none; flex:none; }
body .app-collectible .app-card-paper > img { flex:1; min-height:0; width:calc(100% - 20px); height:0; margin:0 10px; object-fit:cover; border:.6px solid #D7C3A0; border-radius:7px; }
body .app-collectible .card-front .card-footer { flex:none; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; min-height:0; border:0; margin:0; padding:8px 18px 12px; color:var(--card-seal); }
.app-seal-row { display:flex; align-items:center; justify-content:center; gap:10px; }
.app-seal-row::before,.app-seal-row::after { content:''; height:.6px; width:24px; background:var(--card-engraving); opacity:.65; }
.app-seal { width:clamp(20px,12cqw,36px); height:clamp(20px,12cqw,36px); border:1.5px solid var(--card-engraving); border-radius:50%; display:grid; place-items:center; background:var(--card-seal); color:#F8F3E7; }
.app-seal svg { width:58%; height:58%; }
body .app-collectible .card-front .rarity-label { color:var(--card-seal); font:400 clamp(8px,3.67cqw,11px)/1.4 Instrument,sans-serif; letter-spacing:1.2px; text-transform:uppercase; border:0; border-radius:0; padding:0; }
body .app-collectible .card-front .app-card-meta { display:block; font:400 clamp(8px,3.33cqw,10px)/1.4 Instrument,sans-serif; color:#4E5B3D; letter-spacing:.2px; }
.app-engravings { position:absolute; inset:7px; color:var(--card-engraving); pointer-events:none; }
.app-corner { position:absolute; width:clamp(15px,8.33cqw,25px); height:clamp(15px,8.33cqw,25px); stroke-width:.7; }
.corner-0 { top:0; left:0; }.corner-1 { top:0; right:0; transform:rotate(90deg); }.corner-2 { bottom:0; right:0; transform:rotate(180deg); }.corner-3 { bottom:0; left:0; transform:rotate(270deg); }
body .app-collectible .card-face.card-reverse { background:#17211A; border:1px solid #71815A; outline:0; padding:clamp(12px,5.3cqw,16px); gap:12px; align-items:stretch; text-align:left; }
body .app-collectible .card-reverse > svg { display:none; }
body .app-collectible .card-reverse .card-title,.landing-page .app-collectible .card-face.card-reverse .card-title { font:400 clamp(16px,8cqw,24px)/1.2 Gloock,serif; margin:0; padding:0 0 10px; border-bottom:.6px solid #4E5B3D; color:#F8F3E7; }
body .app-collectible .card-reverse > span:not(.card-title):not(.card-note) { font:400 clamp(10px,4.33cqw,13px)/1.45 Instrument,sans-serif; color:#D7C3A0; }
body .app-collectible .card-reverse .card-note { margin-top:auto; padding-top:8px; border-top:.6px solid #4E5B3D; color:#A2AF8C; font-size:9px; }
body .saved-card .app-seal-row::before,body .saved-card .app-seal-row::after { display:none; }
body .saved-card .card-front .card-footer { padding:6px 10px 8px; }
.app-badge { --badge-ink:#365776; position:relative; display:grid; place-items:center; width:124px; height:136px; border-radius:40px; border:6px solid var(--badge-ink); padding:8px; color:var(--badge-ink); background:#EFE2C5; box-shadow:0 18px 26px -18px #17211a88; margin-inline:auto; }
.app-badge-inner { border:1px solid currentColor; border-radius:29px; width:100%; height:100%; display:grid; place-items:center; }
.app-badge svg { flex-shrink:0; }
.app-badge-inner > svg { width:64px; height:64px; }
.app-badge-check { position:absolute; bottom:-4px; right:-7px; width:30px; height:30px; padding:4px; border-radius:10px; background:#EFE2C5; }
.app-badge-check svg { width:100%; height:100%; }
.app-badge[data-tier="common"] { --badge-ink:#53554C; }.app-badge[data-tier="uncommon"] { --badge-ink:#425938; }.app-badge[data-tier="epic"] { --badge-ink:#654584; }.app-badge[data-tier="legendary"] { --badge-ink:#785517; }
.app-badge.badge-early { width:186px; height:204px; border-radius:60px; padding:12px; background:linear-gradient(145deg,#FFF2C3,#EFE2C5); border-color:#5DBBB0; color:#785517; transform:rotate(-6deg); box-shadow:0 24px 36px -20px #000a; }
.app-badge.badge-early .app-badge-inner { border-radius:43px; position:relative; }
.app-badge.badge-early .app-badge-inner > svg { width:96px; height:96px; }
.app-badge.badge-early .app-badge-check { width:40px; height:40px; bottom:-5px; right:-8px; background:#EFE2C5; color:#785517; }
.early-badge .edition-engraving { position:absolute; bottom:15px; font-size:8px; letter-spacing:1.2px; color:#785517; }
.badge-cabinet .badge-example { min-width:130px; }
.badge-example figcaption { font-size:20px; max-width:18ch; margin-inline:auto; }
.badge-example figcaption small { text-transform:capitalize; }
.rarity-gallery { grid-template-columns:repeat(5,minmax(0,1fr)); gap:24px; }
.display-card:nth-child(5) { transform:rotate(8deg) translateY(8px); }
.cards-section .rarity-caption { max-width:58ch; }
.app-chapter-list { margin-top:32px; }
.chapter-catalog > p,.source-reading > p { margin-top:24px; color:var(--moss); }
.resource-rows.source-links > a { grid-template-columns:1fr 24px; }
.app-chapter-row { display:grid; grid-template-columns:170px 1fr; gap:28px; padding:30px 0; border-bottom:1px solid var(--line); align-items:center; }
.app-chapter-row h3 { font:400 24px/1.3 Gloock,serif; }
.app-chapter-row p { margin-top:12px; color:var(--moss); }
.chapter-roster { list-style:none; padding:0; margin:16px 0 0; display:flex; flex-wrap:wrap; gap:8px; }
.chapter-roster li { padding:4px 9px; font-size:12px; border:1px solid var(--line); border-radius:5px; }
.chapter-data { display:block; margin-top:12px; font-size:12px; color:var(--moss); }
.back-to-top { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; padding:5px 10px; border:1px solid var(--line); border-radius:7px; font-size:11px; text-decoration:none; white-space:nowrap; }
.back-to-top svg { width:14px; height:14px; }
.document-footer .back-to-top { margin-left:auto; }
.button.button-outline { background:transparent; color:var(--forest); border:1px solid var(--forest); box-shadow:none; }
.button.button-outline:hover { background:transparent; color:var(--rust); border-color:var(--rust); }
@media (max-width:1150px) { .rarity-gallery { gap:14px; } }
@media (min-width:941px) and (max-width:1150px) { .site-header { padding-inline:28px; gap:15px; }.site-header nav { gap:15px; }.login-link { margin-left:0; } }
@media (max-width:940px) { .rarity-gallery { grid-template-columns:repeat(3,minmax(0,1fr)); gap:30px; }.cards-section .display-card { max-width:240px; justify-self:center; }.cards-section .display-card:nth-child(n) { transform:rotate(0); }.cards-section .rarity-gallery .display-card .app-card-meta { display:block; } }
@media (max-width:680px) { .rarity-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px 14px; }.app-badge { width:110px; height:120px; border-radius:36px; }.app-badge-inner { border-radius:25px; }.app-badge-inner > svg { width:54px; height:54px; }.app-badge.badge-early { width:164px; height:180px; border-radius:53px; }.app-badge.badge-early .app-badge-inner { border-radius:36px; }.app-chapter-row { grid-template-columns:1fr; gap:24px; text-align:center; }.app-chapter-row p { margin-inline:auto; }.chapter-roster { justify-content:center; }.footer-bottom { flex-wrap:wrap; gap:16px; } }
@media (prefers-reduced-motion:reduce) { .app-badge.badge-early { transform:none; } }
