:root{color-scheme:dark;font-family:system-ui,-apple-system,sans-serif;color:#fdf5dd;background:#082c26;line-height:1.45}
*{box-sizing:border-box}
body.ic-guide{margin:0;min-block-size:0;block-size:100vh;block-size:100dvh;
 display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
.guide{max-width:780px;margin:auto;padding:max(18px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))}
a{color:#ffe3a5;text-underline-offset:3px}.back{display:inline-flex;align-items:center;min-height:44px}.hero{display:flex;align-items:center;gap:14px;padding:12px 0}.hero img{border-radius:14px;flex:none}.hero h1{margin:3px 0;font:700 clamp(1.8rem,7vw,3.2rem)/1.08 Georgia,serif;color:#ffe6a9}.kicker{font-size:.75rem;font-weight:800;letter-spacing:.125em;margin:0;color:#ffe0a4}
label{display:block;font-weight:700;margin:18px 0 6px}input{width:100%;min-height:46px;border:1px solid #c6a66c;border-radius:10px;background:#fcf5de;color:#102d25;padding:10px 12px;font:inherit}
.muted,.condition{color:#cbe1d6}#match-count{min-height:1.5em}
details{margin:8px 0;border:1px solid #a58d55;border-radius:12px;background:#0c3c31;overflow:hidden}
summary{padding:13px 12px;cursor:pointer;font-weight:750;min-height:46px}summary small{color:#ffe0a4;display:block;font-size:.8rem;margin:4px 0 0 1.1rem;font-weight:500}
section{padding:0 12px 12px}section h2{font-size:1.03rem;color:#ffe0a4;margin:12px 0 5px}section p{margin:6px 0 10px}
.tiles-guide{display:flex;flex-wrap:wrap;gap:8px;padding:8px;background:#082c26;border-radius:9px;align-items:flex-start}.tile-group{display:flex;gap:2px}.tile-group img{width:clamp(20px,6vw,30px);height:auto;aspect-ratio:88/122;display:block}.schematic{display:inline-block;border:1px solid #c6a66c;border-radius:8px;padding:4px 7px;color:#fff0bf}
:focus-visible{outline:3px solid #ffe3a5;outline-offset:2px}
.extras-guide{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px}
.extras-guide figure{margin:0;padding:9px;background:#082c26;border-radius:8px;text-align:center}
.extras-guide img{display:block;margin:0 auto 7px;width:min(100%,66px);height:auto}
.extras-guide figcaption{font-size:.83rem}

/* A focused, high-contrast example card in the spirit of the reference. */
.guide-example-list{display:grid;gap:7px;margin:9px 0 13px}
.guide-example{margin:0;border:1px solid #d1b681;background:#f4ebd4;color:#182c25}
.guide-example-heading{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:11px 12px;text-wrap:balance;list-style:none}
.guide-example-heading::-webkit-details-marker{display:none}
.guide-example-heading>span{display:flex;align-items:baseline;gap:7px;min-width:0;overflow-wrap:anywhere}
.guide-example-heading>span::before{content:'▸';flex:none;color:#815426}
.guide-example[open]>.guide-example-heading>span::before{content:'▾'}
.guide-example-value{font-size:.8rem;line-height:1.2;text-align:center;padding:5px 8px;border-radius:8px;background:#173e33;color:#fff3d2;max-width:42%;overflow-wrap:anywhere}
.guide-example-body{border-top:1px solid #dfcc9e;padding:9px 12px 11px}
.guide-example-text{font-weight:630}
.guide-example-sets{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0}
.guide-example-set{margin:0;max-width:100%;min-width:0;padding:7px 8px 8px;border-radius:9px;background:#fff9ea;border:1px solid #eaddbc}
.guide-example-set figcaption{font-weight:750;font-size:.8rem;margin:0 0 4px;color:#47564c}
.guide-example-tiles{display:flex;flex-wrap:wrap;gap:2px}
.guide-example-tiles img{display:block;width:clamp(26px,8vw,40px);height:auto;aspect-ratio:88/122;filter:drop-shadow(0 1px 1px #55401c30)}
.guide-example-context{color:#4f5848;font-size:.86rem;border-left:3px solid #ac8250;padding-left:8px}
.guide-example :focus-visible{outline-color:#3b6956;outline-offset:-3px}

.guide-back,.guide-profile-actions{display:flex;flex-wrap:wrap;gap:8px 14px}
.guide-profile-actions{margin:10px 0}
.guide-profile-actions a{display:inline-flex;align-items:center;min-height:44px;padding:4px 14px;border:1px solid #a58d55;border-radius:9px;background:#153f34;color:#ffe3a5;font-weight:650}

.orama-guide-list{margin:6px 0 12px;padding-inline-start:1.45rem}
.orama-guide-list li+li{margin-block-start:5px}

/* Majiang pattern cards reuse the regular guide palette and disclosure. */
#orama-pattern-catalog[hidden]{display:none}
#orama-pattern-rows .guide-example-heading{min-height:44px}
#orama-pattern-rows .guide-example-value{flex:none;font-variant-numeric:tabular-nums}
#orama-pattern-rows .orama-pattern-figure{margin:.5rem 0 0}
#orama-pattern-rows .orama-pattern-tiles{display:flex;flex-wrap:wrap;gap:6px 9px}
#orama-pattern-rows .orama-pattern-tiles .guide-example-tiles{max-width:100%;min-width:0;flex-wrap:wrap}
#orama-pattern-rows .orama-pattern-tiles img{width:clamp(20px,4vw,34px)}

/* Independent rows: iOS can otherwise clip sticky descendants of a rotated
   scrolling element. In the rotated layout the body owns the safe-area insets. */
body.ic-page.ic-guide > .guide{
 position:relative;inline-size:min(100%,850px);max-width:none;block-size:100%;
 min-block-size:0;margin:0 auto;padding:10px 14px 24px;overflow:auto;
 overscroll-behavior:contain;scroll-margin-block:0;font-size:clamp(.875rem,2.5vw,1rem);
}
.guide-back{align-items:center;min-height:48px;padding:0 max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));
 flex-wrap:nowrap;gap:8px;background:#251317;border-bottom:1px solid #8c5b43}
.game-landscape-compact .guide-back{padding-inline:12px}
.guide-nav-title{font-weight:750;flex:1;line-height:1.15}
.guide-back .back{flex-shrink:0;color:#ffe0a3}
.guide-back a:focus-visible{outline-offset:-2px}
.guide details{scroll-margin-block-start:8px}
.guide .hero h1{font-size:clamp(1.6rem,5vw,2.75rem)}
.game-landscape-compact .guide .hero img{width:48px;height:48px}

/* Keep each completed Chow, Pong, Kong or pair together as the rack wraps. */
.guide-finished-title{margin:.28rem 0 .48rem;color:#ffe3a5;font-size:.89rem}
.guide-finished-rack{gap:6px;padding:7px}
.guide-finished-rack .tile-group{display:grid;justify-items:start;gap:3px;padding:4px 5px;
 border:1px solid #95674f;border-radius:7px;background:#180f15;color:#ffe6bc;max-width:100%}
.guide-finished-faces{display:flex;flex-wrap:wrap;gap:2px}
.guide-finished-group-label{font-size:.74rem;line-height:1.1;font-weight:750}
.guide-finished-rack .guide-finished-bonus{border-style:dashed}
