/* Code-drawn, lightweight illustrations for the three learning activities. */
/* 2026-10-13 v5 grain board: village atlas sprites (assets/village-sprites-v5.png) are clipped per tile by an inline SVG viewBox (see villageSprite in index.html); water cells keep point-water.svg.
   The cart waits at the storehouse (.store .cart-mark) and only drives after 수레 출발; the end of the chosen route is a separate marker (.end-mark: ⚑ on a road, ‘도착 예정’ on a home). */
.cart-board{background:radial-gradient(ellipse at 72% 18%,#a6c27333,transparent 45%),radial-gradient(ellipse at 10% 88%,#cfe09a26,transparent 40%),linear-gradient(170deg,#4b7b4c,#376040 60%,#2f5238);border:3px solid #b3ad78;box-shadow:inset 0 0 35px #122a2780,0 8px 24px #06171840}
.cart-cell{background:transparent!important}.cart-cell.on{background:#f6d67918!important}.cart-cell.head{box-shadow:inset 0 0 0 3px #f3d380!important}
.cart-cell i{width:70px;height:60px;max-width:94%;max-height:76%;font-size:0!important;display:block;filter:drop-shadow(0 3px 2px #13291d66)}.cart-cell i svg,.cart-homes i svg,.cart-cell .cart-mark svg{width:100%;height:100%;display:block}
.cart-cell.water i{background:url('assets/point-water.svg') center/contain no-repeat}.cart-cell.road i{width:6px;height:6px;border-radius:50%;background:#f3df9b80;filter:none}
.cart-cell small{font-size:11px;background:#1a3428d9;padding:2px 5px;border-radius:5px;position:absolute;bottom:3px;z-index:3;max-width:100%}
.cart-cell .cart-mark{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:4}.cart-cell .cart-mark:empty{display:none}.cart-cell .cart-mark svg{width:76%;height:76%;filter:drop-shadow(0 3px 2px #12231b99)}.cart-cell.store .cart-mark{inset:auto -4% 9% auto;width:62%;height:54%}.cart-cell.store .cart-mark svg{width:100%;height:100%}
.cart-cell .end-mark{position:absolute;top:2px;right:3px;z-index:5;font-size:16px;line-height:1;color:#ffe08a;text-shadow:0 1px 2px #0009;pointer-events:none}.cart-cell .end-mark.arrive{font-size:10px;font-weight:800;color:#2b2410;background:#ffe08a;padding:2px 5px;border-radius:5px;box-shadow:0 1px 3px #0006;white-space:nowrap}
.cart-cell.delivered:after{content:'✓';position:absolute;top:3px;right:4px;border-radius:50%;background:#c7e9b1;color:#234730;font-weight:900;width:19px;height:19px;font-size:13px;z-index:5}
.cart-homes i{flex:0 0 40px;height:36px;font-size:0;display:block}.cart-homes i.ok-mark{font-size:22px;color:#a9f1d4;text-align:center;line-height:36px}.cart-homes>div>div{padding:0;background:none;display:block}.cart-homes small{display:block}
.cart-lines .road-edge{stroke:#7a6540;stroke-width:17;stroke-linecap:round;opacity:.9;vector-effect:non-scaling-stroke}.cart-lines .road{stroke:#d9c58f;stroke-width:11;opacity:.95}.cart-lines .route{stroke:#ffe79a;stroke-width:5;filter:drop-shadow(0 0 4px #ffdc6380)}
.cart-steps{margin:0 0 6px;justify-content:center}.cart-steps span{font-size:13px;padding:4px 10px}
.ship-stage{background:linear-gradient(180deg,#173c47,#276470);box-shadow:inset 0 -20px 30px #12414d}.ship-stage:before{content:'';position:absolute;inset:60% 0 0;background:repeating-linear-gradient(170deg,transparent 0 18px,#b0d8c31f 19px 21px,transparent 22px 38px);pointer-events:none}.ship .hull{background:repeating-linear-gradient(0deg,#754926 0 9px,#916437 10px 12px);border-top:4px solid #dbbd78;box-shadow:0 7px 0 #103d4940}.ship .deck{background:linear-gradient(100deg,#a17643,#8e632e);border-color:#e0bc7e}.ship .mast:after{filter:drop-shadow(2px 2px 1px #694d3433)}
@media(max-width:600px){.cart-layout>.activity-desc{line-height:1.6;font-size:14px;margin:4px 0 8px}.cart-cell i{width:50px;height:43px}.cart-cell .end-mark{font-size:14px}.cart-cell .end-mark.arrive{font-size:9px;padding:1px 4px}.cart-steps span{font-size:11px;padding:3px 7px}.cart-cell small{font-size:9px;padding:1px 3px}.cart-homes div{font-size:12px;padding:5px 7px}.cart-homes i{flex-basis:29px;height:27px}.cart-homes small{font-size:11px}.cart-layout{gap:8px}.cart-tools button{font-size:12px;padding:5px 8px;min-height:40px}.ship-stage{min-height:170px;padding:6px 6px 30px}.ship-meter{font-size:12px}.cargo-card.pickable{padding:5px}.cargo-card.pickable img{width:30px;height:30px}.cargo-card.pickable p{font-size:12px;margin:2px 0}.cargo-card .where{font-size:10px}.cargo-grid{gap:5px}dialog[data-kind="activity-balance"] .activity-desc{font-size:14px;line-height:1.6;margin:4px 0 8px}.inlay-stage{max-width:260px}.inlay-guide{font-size:14px}.inlay-steps span{font-size:10px;padding:4px}.inlay-pct{font-size:12px}}
/* 2026-10-12 v4.1 usability, scoped to the three point activities only (#modal[data-point="grain"|"cargo"|"celadon"]). Other missions keep the shared activity CSS. */
#modal[data-point] .activity-hero{margin:2px 0 6px}#modal[data-point] .activity-hero p{color:#ffe9b8;font-weight:700}#modal[data-point] .rule-line{margin-bottom:6px}
.point-status{margin:2px 0 8px;padding:8px 12px;border-radius:9px;background:#223f49;border:1px solid #3d6066;color:#e8f1ee;font-size:15px;line-height:1.6;font-weight:600;text-align:center;word-break:keep-all}.point-status b{color:#ffe9b8}
#modal[data-point] .activity-footer .hint-box{margin-top:6px}#modal[data-point] .activity-footer .dialog-actions{margin-top:6px}
/* v4.2: 44px touch targets for the point activities only. The hint button in index.html uses min-height:36px!important, so this scoped rule must also be !important; the phone rule above (.cart-tools button 40px) is overridden by the higher-specificity selector. */
#modal[data-point] .paid-hint button{min-height:44px!important;padding:6px 0}#modal[data-point] .cart-tools button{min-height:44px}
/* grain: cells the cart may move to next glow; the route itself is still chosen by the student. */
.cart-cell.next{background:#ffe08a26!important;box-shadow:inset 0 0 0 2px #ffe9a6cc,0 0 10px #ffe08a99;animation:cartGlow 1.1s ease-in-out infinite alternate}.cart-cell.next.road i{width:10px;height:10px;background:#ffe9a6}
@keyframes cartGlow{from{box-shadow:inset 0 0 0 2px #ffe9a699,0 0 3px #ffe08a44}to{box-shadow:inset 0 0 0 3px #fff2c4,0 0 14px #ffe08acc}}
/* cargo: picked-card target decks pulse; card name and weight on separate lines. */
.deck.target{animation:deckGlow 1s ease-in-out infinite alternate}.deck.target b{color:#fff6d8}@keyframes deckGlow{from{outline-color:#ffe08a88}to{outline-color:#fff6d8}}
.cargo-card .cargo-w{display:block;font-size:12px;color:#c7dad4;line-height:1.3}#modal[data-point="cargo"] .cargo-card .cargo-name{margin:4px 0 0}
/* celadon: sub-step chips for 메우기 → 닦기 */
.inlay-sub{display:flex;justify-content:center;gap:6px;margin:0 0 6px;font-size:13px}.inlay-sub span{padding:4px 10px;border-radius:20px;background:#12303a;color:#9fb8b3;border:1px solid #3d6066}.inlay-sub span.now{color:#ffe9b8;border-color:#ffd76a;background:#2f3d2c;font-weight:700}.inlay-sub span.done{color:#a9f1d4;border-color:#4f8f78}
#modal[data-point="celadon"] .inlay-guide{margin:0 0 6px}#modal[data-point="celadon"] .inlay-steps{margin-bottom:6px}
@media(prefers-reduced-motion:reduce){.cart-cell.next,.deck.target{animation:none}.deck.target{outline-color:#fff6d8}}
/* phones: title and controls share one row when they fit, hint cost note inline, four cargo cards in one row, larger inlay canvas. Font sizes stay ≥11px and touch targets ≥44px. */
@media(max-width:600px){#modal[data-point] .activity-heading{padding-top:6px}#modal[data-point] .dialog-top>.tag{flex:1 1 auto;min-width:0}#modal[data-point] .dialog-top>.sound-controls{width:auto;margin-left:auto}#modal[data-point] .activity-hero p{font-size:13px;line-height:1.5}#modal[data-point] .rule-line{line-height:1.5}#modal[data-point] .paid-hint .hint-row{display:flex;flex-wrap:wrap;align-items:center;gap:2px 10px}#modal[data-point] .paid-hint small{display:inline}#modal[data-point] .activity-footer .feedback{margin-top:6px}.point-status{font-size:14px;padding:7px 10px;margin:0 0 6px}
#modal[data-point="cargo"] .cargo-grid{grid-template-columns:repeat(4,1fr);gap:5px}#modal[data-point="cargo"] .cargo-card.pickable{padding:6px 3px;min-height:44px}#modal[data-point="cargo"] .cargo-card.pickable img{width:30px;height:30px}#modal[data-point="cargo"] .cargo-card .cargo-name{font-size:12px;margin:3px 0 0;line-height:1.35;word-break:keep-all}#modal[data-point="cargo"] .cargo-card .cargo-w{font-size:11px}#modal[data-point="cargo"] .cargo-card .where{font-size:11px;line-height:1.3;word-break:keep-all;margin-top:3px}#modal[data-point="cargo"] .ship-stage{min-height:0;padding:6px 6px 22px}#modal[data-point="cargo"] .deck{min-height:88px}#modal[data-point="cargo"] .ship-meter{margin-top:8px}
#modal[data-point="celadon"] .inlay-stage{max-width:none}#modal[data-point="celadon"] #inlayCanvas{width:min(100%,340px,max(250px,calc(100dvh - 400px)))}#modal[data-point="celadon"] .inlay-steps span{font-size:11px;padding:3px 7px}#modal[data-point="celadon"] .inlay-sub span{font-size:12px;padding:3px 9px}#modal[data-point="celadon"] .inlay-guide{font-size:14px;line-height:1.55}
#modal[data-point="grain"] .cart-layout{gap:6px}#modal[data-point="grain"] .cart-tools{margin-top:6px}}
/* landscape tablet/PC: status spans the grain columns; the inlay canvas sits beside its guide so it is not pushed below the fold. */
@media(min-width:800px) and (orientation:landscape){#modal[data-point="grain"] .point-status{grid-column:1/-1;margin:4px 0 2px}#modal[data-point="celadon"] .inlay-wrap{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:4px 20px;align-items:center}#modal[data-point="celadon"] .inlay-stage{grid-column:2;grid-row:1/6}#modal[data-point="celadon"] .inlay-steps{flex-direction:column;align-items:flex-start}#modal[data-point="celadon"] .inlay-guide{text-align:left}}
/* 2026-10-13 v4.3 short portrait phones (375×667 class). Scoped to the three point activities only (#modal[data-point]); other missions keep the shared layout.
   The dialog already uses calc(100dvh - 24px), so the fix trims spacing in the fixed heading/footer and the tallest body parts instead of hiding anything:
   every text, the hint button with its −3점 label, the free re-read note, the rule line and the 44px touch targets stay. On real phones the browser
   toolbars shrink 100dvh (a nominal 812/844px phone leaves roughly 660–690px), so the rule covers portrait phones up to 900px rather than only 667px. */
@media(max-width:600px) and (max-height:900px){
#modal[data-point] .activity-heading{padding-top:4px}#modal[data-point] .activity-hero{margin:0 0 4px}#modal[data-point] .activity-hero h2{font-size:17px;line-height:1.3}#modal[data-point] .activity-hero p{margin-top:3px;line-height:1.4}#modal[data-point] .rule-line{padding:5px 9px;margin-bottom:4px;line-height:1.45}
#modal[data-point] .activity-footer{padding-bottom:6px}#modal[data-point] .activity-footer .hint-box{margin-top:4px;padding:3px 10px}#modal[data-point] .activity-footer .dialog-actions{margin-top:4px;flex-wrap:nowrap}#modal[data-point] .activity-footer .dialog-actions button{flex:1 1 auto;min-width:0;min-height:44px;padding:9px 8px;font-size:15px;line-height:1.3;word-break:keep-all}
#modal[data-point] .point-status{font-size:13px;line-height:1.5;padding:5px 8px;margin:0 0 5px}
/* cargo: shorter mast, hull and water margin so the four cargo cards start above the fold; deck min-height equals its height with chips, so nothing jumps. */
#modal[data-point="cargo"] .ship-stage{padding:4px 6px 12px}#modal[data-point="cargo"] .mast{height:92px}#modal[data-point="cargo"] .deck{min-height:80px}#modal[data-point="cargo"] .hull{height:24px}#modal[data-point="cargo"] .ship-meter{margin-top:6px;font-size:12px}#modal[data-point="cargo"] .cargo-card.pickable{padding:5px 3px}#modal[data-point="cargo"] .cargo-card.pickable img{width:28px;height:28px}
/* celadon: the four step chips sit in one horizontally scrollable row (steps 1–2, including the current one, are visible without scrolling; 3–4 scroll in), the guide is one size smaller, and the canvas is sized to the height that remains. */
#modal[data-point="celadon"] .inlay-steps{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;padding-bottom:2px;margin-bottom:4px}#modal[data-point="celadon"] .inlay-steps span{flex:0 0 auto;white-space:nowrap}#modal[data-point="celadon"] .inlay-sub{margin-bottom:4px}#modal[data-point="celadon"] .inlay-guide{font-size:13px;line-height:1.5;margin-bottom:4px}#modal[data-point="celadon"] #inlayCanvas{width:min(100%,340px,max(250px,calc(100dvh - 410px)))}#modal[data-point="celadon"] .inlay-progress{margin:6px 0 2px}
}
/* v4.3 landscape phones (≤520px tall: 667×375, 812×375, 844×390 …). Heading puts the goal and rule side by side, the footer puts the hint row and the buttons side by side,
   and each activity uses two columns so the board, the decks/cards and the inlay canvas are not pushed below the fold. Tablets/PC (e.g. 1024×768) are taller and unaffected. */
@media(orientation:landscape) and (max-height:520px){
#modal[data-point] .activity-heading{display:flex;flex-wrap:wrap;align-items:center;column-gap:14px;padding-top:4px}#modal[data-point] .activity-heading .dialog-top{flex:1 1 100%}#modal[data-point] .activity-hero{flex:1 1 300px;margin:0 0 4px}#modal[data-point] .rule-line{flex:1 1 220px;margin:0 0 4px}
#modal[data-point] .activity-footer{display:flex;flex-wrap:wrap;align-items:center;column-gap:12px;padding-bottom:6px}#modal[data-point] .activity-footer .feedback{flex:1 1 100%}#modal[data-point] .activity-footer .hint-box{flex:1 1 300px;margin-top:4px}#modal[data-point] .activity-footer .dialog-actions{flex:1 1 240px;margin-top:4px}
#modal[data-point] .point-status{margin:0 0 4px;padding:5px 10px;font-size:13px;line-height:1.5}
/* grain: board left (height-limited so all four rows stay visible), status + homes + tools right. The 228px floor (5 cells × 44px + 2 × 3px border + 2px) keeps every cell ≥44px and the
   last row uncut on very short screens (640×360, 568×320); the board then overflows the fold and is reached through the existing .activity-main scroll instead of being clipped. */
#modal[data-point="grain"] .cart-layout{grid-template-columns:minmax(228px,1.1fr) minmax(200px,1fr);align-items:start;gap:4px 12px}#modal[data-point="grain"] .cart-board{grid-column:1;grid-row:1/3;min-width:228px;max-width:max(228px,min(400px,calc((100dvh - 190px)*1.25)))}#modal[data-point="grain"] .point-status{grid-column:2;grid-row:1}#modal[data-point="grain"] .cart-layout>div:last-child{grid-column:2;grid-row:2}#modal[data-point="grain"] .cart-cell:not(.road) i{width:38px;height:32px}#modal[data-point="grain"] .cart-cell .end-mark{font-size:13px;top:1px;right:2px}#modal[data-point="grain"] .cart-cell .end-mark.arrive{font-size:0;padding:2px 4px}#modal[data-point="grain"] .cart-cell .end-mark.arrive::after{content:'도착';font-size:9px}#modal[data-point="grain"] .cart-cell small{font-size:9px;padding:1px 3px}#modal[data-point="grain"] .cart-steps{margin-bottom:4px}#modal[data-point="grain"] .cart-steps span{font-size:11px;padding:3px 7px}#modal[data-point="grain"] .cart-tools{margin-top:4px}
/* cargo: ship left, four one-line cards (icon · name · weight · where) in a 2×2 grid right. Explicit rows reset the shared landscape rule (dialog[data-kind="activity-balance"] .cargo-grid{grid-row:1/3})
   that otherwise pushed the status line to row 3 and the ship to row 4 on 812×375 / 844×390. */
#modal[data-point="cargo"] .activity-main{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:4px 12px;align-content:start}#modal[data-point="cargo"] .point-status{grid-column:1/-1;grid-row:1}#modal[data-point="cargo"] .ship-stage{grid-column:1;grid-row:2}#modal[data-point="cargo"] .cargo-grid{grid-column:2;grid-row:2}#modal[data-point="cargo"] .ship-stage{padding:4px 6px 10px}#modal[data-point="cargo"] .mast{height:92px}#modal[data-point="cargo"] .deck{min-height:80px}#modal[data-point="cargo"] .hull{height:24px}#modal[data-point="cargo"] .ship-meter{margin-top:6px;font-size:12px}
#modal[data-point="cargo"] .cargo-grid{grid-template-columns:1fr 1fr;gap:6px;align-self:start}#modal[data-point="cargo"] .cargo-card.pickable{display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;text-align:left;padding:4px 8px;min-height:44px}#modal[data-point="cargo"] .cargo-card.pickable img{width:28px;height:28px}#modal[data-point="cargo"] .cargo-card .cargo-name,#modal[data-point="cargo"] .cargo-card .cargo-w,#modal[data-point="cargo"] .cargo-card .where{margin:0;font-size:12px;line-height:1.3}
/* celadon: steps/guide/progress left, canvas right, canvas height tied to the viewport (180px floor keeps grooves ≈23px wide). */
#modal[data-point="celadon"] .inlay-wrap{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 14px;align-items:center}#modal[data-point="celadon"] .inlay-stage{grid-column:2;grid-row:1/6}#modal[data-point="celadon"] .inlay-steps{flex-direction:row;flex-wrap:wrap;align-items:center;margin-bottom:4px}#modal[data-point="celadon"] .inlay-guide{text-align:left;font-size:13px;line-height:1.5;margin:0 0 4px}#modal[data-point="celadon"] #inlayCanvas{width:clamp(180px,calc(100dvh - 210px),300px)}#modal[data-point="celadon"] .inlay-progress{margin:4px 0 2px}
}
/* 2026-10-13 v5 · 375×667-class portrait phones: the cargo screen overflowed .activity-main by ≈16px after v4.3 (heading 191px / footer 133px). Deck, mast, hull and card icons lose a few px each
   (the deck min-height still equals its height with 26px chips, so nothing jumps); all texts, the hint button with −3점 and the free re-read note stay, and .activity-main keeps scrolling. */
@media(max-width:600px) and (max-height:700px){
#modal[data-point] .activity-hero p{line-height:1.35}#modal[data-point] .rule-line{padding:4px 8px;line-height:1.4}#modal[data-point] .point-status{margin-bottom:4px}
#modal[data-point="cargo"] .ship-stage{padding:3px 6px 8px}#modal[data-point="cargo"] .mast{height:80px}#modal[data-point="cargo"] .deck{min-height:72px;padding-bottom:24px}#modal[data-point="cargo"] .deck .chip img{width:26px;height:26px}#modal[data-point="cargo"] .hull{height:20px}#modal[data-point="cargo"] .ship-meter{margin-top:4px}#modal[data-point="cargo"] .cargo-grid{gap:4px}#modal[data-point="cargo"] .cargo-card.pickable{padding:4px 3px}#modal[data-point="cargo"] .cargo-card.pickable img{width:26px;height:26px}#modal[data-point="cargo"] .cargo-card .cargo-name{margin-top:2px}
}
/* ===== 2026-10-13 v5 pictures for four Songak/Gaegyeong missions (founding · refugees · inheritance · policy). Scoped by their own classes; no data-point scope is added to these missions. ===== */
/* Shared scene frame: a 3:2 picture (img or clipped atlas SVG) with a short caption. */
.scene-figure{margin:0 0 12px;background:#12303a;border:1px solid #4d6b6d;border-radius:12px;overflow:hidden}.scene-figure img,.scene-figure svg{display:block;width:100%;aspect-ratio:3/2;object-fit:cover;background:#0d1f26}.scene-figure figcaption{padding:8px 12px 10px;font-size:14px;line-height:1.6;color:#dbe7e3;word-break:keep-all}.scene-figure figcaption b{color:#ffe9b8}.scene-figure figcaption small{display:block;margin-top:4px;color:#9fb8b3;font-size:12px}
/* refugees: scene beside the question on landscape tablets/PC, above it elsewhere. */
.decision-wrap .decision-body{min-width:0}
@media(min-width:800px) and (orientation:landscape){.decision-wrap{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:6px 18px;align-items:start}.decision-wrap .scene-figure{margin:0}.decision-wrap .quiz-question{margin-top:4px}}
/* founding: one 1:2 triptych panel per card; the whole panel is shown (meet), arrows stay ≥44×44. */
.order-pic{flex:0 0 auto;width:54px;height:108px;border-radius:8px;overflow:hidden;border:1px solid #6d8a86;background:#10252d}.order-pic svg{width:100%;height:100%;display:block}.founding-list .order-row{align-items:center}.founding-list .order-row button{min-width:44px;min-height:44px;padding:7px 10px}
/* inheritance: scene + evidence (left) and the share board (right on landscape tablets/PC, see index.html .case-wrap). */
.case-scene figcaption{font-size:13px}.share-board{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:6px 0 0}.share-side{text-align:center;background:#29424c;border-radius:13px;padding:12px 10px 10px;border:2px solid transparent;min-width:0}.share-side.sister{border-color:#f0a8b8aa}.share-side.brother{border-color:#8fc3f0aa}.share-side>b{font-size:1rem;color:#f0e7cf}.share-side strong{display:block;font-size:2.5rem;line-height:1.1;color:var(--gold);margin:4px 0 0;font-variant-numeric:tabular-nums}.share-side>span{font-size:13px;color:#b9d0cd}.share-btns{display:flex;gap:8px;justify-content:center;margin-top:8px}.share-btns button{min-width:52px;min-height:48px;font-size:1.5rem;font-weight:800;padding:0;line-height:1}
.share-tokens{grid-column:1/-1;display:flex;gap:4px;justify-content:center;align-items:center;padding:8px 6px;background:#10252d;border-radius:10px;min-height:44px}.share-tokens i{flex:1 1 0;max-width:26px;aspect-ratio:1;border-radius:50%;background:#8fc3f0;box-shadow:inset 0 -3px 0 #0003}.share-tokens i.s{background:#f0a8b8}.share-tokens i.s+i.b{margin-left:12px}.share-status{text-align:center;margin:8px 0 0;font-size:14px;color:#d5edc7;font-weight:700}
/* policy: picture (3:2) beside each situation; the select stays full width under the label. */
.match-row.with-pic{display:grid;grid-template-columns:136px minmax(0,1fr);gap:8px 14px;align-items:center}.match-pic{display:block;aspect-ratio:3/2;border-radius:9px;overflow:hidden;border:1px solid #6d8a86;background:#10252d}.match-pic svg{width:100%;height:100%;display:block}.match-row.with-pic label{margin-bottom:6px}.match-body{min-width:0}
@media(max-width:600px){.scene-figure figcaption{font-size:13px;padding:7px 10px 9px}.order-pic{width:42px;height:84px}.founding-list .order-row{gap:6px;padding:8px 6px}.founding-list .order-row .order-label{font-size:14px}.share-side{padding:10px 6px 8px}.share-side strong{font-size:2.1rem}.share-btns{gap:6px}.share-btns button{min-width:46px;min-height:44px}.share-tokens{gap:3px;padding:6px 4px}.share-tokens i.s+i.b{margin-left:8px}.match-row.with-pic{grid-template-columns:104px minmax(0,1fr);gap:6px 10px}}
@media(orientation:landscape) and (max-height:520px){.decision-wrap{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:4px 14px;align-items:start}.decision-wrap .scene-figure{margin:0}.case-wrap{display:grid;grid-template-columns:1fr 1fr;gap:6px 14px;align-items:start}.case-right .activity-desc{margin:0 0 6px;font-size:14px}.order-pic{width:40px;height:80px}.match-row.with-pic{grid-template-columns:100px minmax(0,1fr)}}
/* ===== 2026-10-13 v6 · pictures for the three hands-on screens (cargo ship · celadon inlay · printing). Rules are placed after every earlier media rule and carry the #modal[data-point] prefix
   where an earlier phone/landscape rule (deck min-height, mast/hull sizes, ship-stage padding) would otherwise win on specificity. Without the picture (.has-art absent) every earlier rule still applies. ===== */
/* cargo · goods from the 2×2 atlas (cargoArt in index.html) on the cards, on the old decks and on the picture decks. Sizes mirror the earlier img rules. */
.cargo-art{display:block}.cargo-card .cargo-art{width:56px;height:56px;margin:0 auto}.deck .chip .cargo-art{width:34px;height:34px;background:#ffffff18;border-radius:6px}
/* cargo · picture ship: the 3:2 picture sits in a dark stage (its own vignette matches), the old mast/hull are hidden, and the two deck buttons are absolutely placed over the empty boards. */
#modal[data-point="cargo"] .ship-stage.has-art{padding:6px 6px 4px;min-height:0;background:radial-gradient(ellipse at 50% 45%,#3a2d1f 0,#1b1510 58%,#0f0c09 100%);box-shadow:inset 0 0 30px #000a}#modal[data-point="cargo"] .ship-stage.has-art:before{display:none}
#modal[data-point="cargo"] .ship-stage.has-art .ship{position:relative;width:min(100%,440px);max-width:none;aspect-ratio:3/2;margin:0 auto}
#modal[data-point="cargo"] .ship-stage.has-art .ship-art{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none;-webkit-user-drag:none}
#modal[data-point="cargo"] .ship-stage.has-art .ship-row{position:absolute;inset:0;display:block;gap:0}#modal[data-point="cargo"] .ship-stage.has-art .mast,#modal[data-point="cargo"] .ship-stage.has-art .hull{display:none}
.deck-spot{position:absolute;top:36%;height:30%;width:31.5%}.deck-spot.deck-L{left:13.5%}.deck-spot.deck-R{left:55%}
#modal[data-point="cargo"] .ship-stage.has-art .deck{position:absolute;inset:0;width:100%;height:100%;min-height:0;padding:0;display:block;background:#ffe9b812;border:2px dashed #ffe9b899;border-radius:7px;box-shadow:inset 0 0 0 1px #0004;transition:background .15s,box-shadow .15s}
#modal[data-point="cargo"] .ship-stage.has-art .deck:hover{background:#ffe9b826}
#modal[data-point="cargo"] .ship-stage.has-art .deck.target{background:#ffd76a2e;border-style:solid;border-color:#ffe08a;outline:none;box-shadow:0 0 0 3px #ffe08a66,0 0 16px #ffd76a99;animation:deckArtGlow 1s ease-in-out infinite alternate}
@keyframes deckArtGlow{from{box-shadow:0 0 0 2px #ffe08a55,0 0 6px #ffd76a66}to{box-shadow:0 0 0 4px #fff6d8aa,0 0 18px #ffd76acc}}
#modal[data-point="cargo"] .ship-stage.has-art .deck:focus-visible{outline:3px solid #fff6d8;outline-offset:2px}
#modal[data-point="cargo"] .ship-stage.has-art .deck b{position:absolute;left:50%;right:auto;top:-12px;bottom:auto;transform:translateX(-50%);white-space:nowrap;font-size:11px;line-height:1;padding:4px 8px;border-radius:12px;background:#15303aee;border:1px solid #ffe3a388;color:#ffe3a3;pointer-events:none;text-align:center}
#modal[data-point="cargo"] .ship-stage.has-art .deck.target b{color:#2b2410;background:#ffe08a;border-color:#fff6d8}
.deck-items{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:5px;pointer-events:none}
.chip-btn{pointer-events:auto;appearance:none;position:relative;width:44px;height:44px;flex:0 0 auto;padding:0;margin:0;border:1px solid #ffe9b855;border-radius:9px;background:#15303a66;box-shadow:0 2px 5px #0008;cursor:pointer;display:block;transition:transform .15s}
.chip-btn:hover{transform:translateY(-2px)}.chip-btn .cargo-art{width:100%;height:100%}.chip-btn:focus-visible{outline:3px solid #ffe08a;outline-offset:1px}
.chip-btn b{position:absolute;top:-7px;right:-7px;width:18px;height:18px;border-radius:50%;background:var(--gold);color:#222a2d;font-size:11px;font-weight:900;line-height:18px;text-align:center;box-shadow:0 1px 3px #0008}
.chip-btn small{position:absolute;left:0;right:0;bottom:-3px;font-size:9px;line-height:1.2;text-align:center;color:#fff2cf;background:#15303acc;border-radius:4px;padding:1px 0;white-space:nowrap}
/* cargo · phones: the picture keeps 3:2 (so the deck overlay stays on the boards) and is height-limited instead of cropped; the 250px / 236px floors keep each deck ≥ 44px tall (30% of the height). */
@media(max-width:600px){#modal[data-point="cargo"] .cargo-card .cargo-art{width:34px;height:34px}#modal[data-point="cargo"] .ship-stage.has-art{padding:4px 4px 2px}#modal[data-point="cargo"] .ship-stage.has-art .ship-meter{margin-top:4px;gap:6px 10px}}
@media(max-width:600px) and (max-height:700px){#modal[data-point="cargo"] .cargo-card .cargo-art{width:30px;height:30px}#modal[data-point="cargo"] .ship-stage.has-art .ship{width:min(100%,max(250px,calc((100dvh - 455px)*1.5)))}}
@media(orientation:landscape) and (max-height:520px){#modal[data-point="cargo"] .cargo-card .cargo-art{width:30px;height:30px;margin:0}#modal[data-point="cargo"] .ship-stage.has-art{padding:4px 4px 2px}#modal[data-point="cargo"] .ship-stage.has-art .ship{width:min(100%,max(236px,calc((100dvh - 205px)*1.5)))}#modal[data-point="cargo"] .ship-stage.has-art .ship-meter{margin-top:4px}.chip-btn{width:38px;height:38px}}
@media(prefers-reduced-motion:reduce){#modal[data-point="cargo"] .ship-stage.has-art .deck.target{animation:none}.chip-btn:hover{transform:none}}
/* celadon · nothing else changes: the picture is drawn inside the existing 360×360 canvas (index.html paint), so the canvas size rules above still apply. */
/* printing · target card, bench picture with DOM slots on the paper, tiles with large readings. Scoped to #modal[data-point="printing"] (arrangement rounds only). */
#modal[data-point="printing"] .print-desc{margin:0 0 8px;font-size:14px;line-height:1.6;word-break:keep-all}
.print-target{background:linear-gradient(135deg,#3a2f1c,#2b2416);border:2px solid var(--gold);border-radius:12px;padding:8px 12px 10px;margin:0 0 10px;text-align:center;box-shadow:0 4px 16px #0005}
.print-target-head{display:flex;align-items:center;justify-content:center;gap:6px 12px;flex-wrap:wrap;font-size:14px;color:#ffe9b8}.print-target-head b{font-size:15px;color:#fff6d8}.print-round{background:#ffe08a;color:#2b2410;border-radius:12px;padding:2px 9px;font-weight:800;font-size:12px}.print-reading{font-size:17px;font-weight:800;color:var(--gold)}
.print-target-chars{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:6px;flex-wrap:nowrap}
.print-tc{display:flex;flex-direction:column;align-items:center;min-width:58px;padding:4px 6px;border-radius:9px;background:#15303a;border:2px solid #5a7a76;color:#fff6d8;line-height:1.1;gap:1px}.print-tc i{font-style:normal;font-size:13px;color:#ffe3a3}.print-tc b{font-size:34px;font-weight:600;line-height:1.1}.print-tc small{font-size:15px;font-weight:800;color:#ffe9b8}
.print-tc.now{border-color:var(--gold);background:#3f3a22;box-shadow:0 0 0 3px #ffd76a55}.print-tc.now i{color:#fff}
/* .set only means ‘a letter is already placed in this position’ (neutral, not green), so it never looks like a correctness mark before 인쇄 is judged. */
.print-tc.set{border-color:#7f9a96;background:#1d3a44;color:#dfeae6}.print-tc.set small,.print-tc.set i{color:#b9d0cd}
.print-arrow{font-size:22px;color:var(--gold);font-weight:900;flex:0 0 auto}
.print-target.fresh{animation:targetPop .9s ease-out 2}@keyframes targetPop{0%{box-shadow:0 4px 16px #0005,0 0 0 0 #ffd76a00}40%{box-shadow:0 4px 16px #0005,0 0 0 8px #ffd76a99}100%{box-shadow:0 4px 16px #0005,0 0 0 0 #ffd76a00}}
.print-stage{position:relative;width:min(100%,520px);aspect-ratio:3/2;margin:0 auto 8px;border-radius:12px;overflow:hidden;background:linear-gradient(#4a3420,#2e1f12);border:1px solid #6a5236;container-type:inline-size}
.print-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block;pointer-events:none;user-select:none;-webkit-user-drag:none}
.print-paper{position:absolute;left:12%;top:27%;width:76%;height:45%;display:flex;align-items:center;justify-content:center;gap:4%}
.print-stage:not(.has-art) .print-paper{background:#f3ecd8;border-radius:4px;box-shadow:0 3px 10px #0007}
.print-slot{position:relative;flex:0 1 20%;max-width:22%;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;border:2px dashed #8a7a5a;border-radius:8px;background:#fffdf5d9;color:#2b2410;line-height:1;box-shadow:0 1px 3px #0003}
.print-slot i{position:absolute;top:2px;left:4px;font-style:normal;font-size:11px;font-size:3.2cqw;color:#7a5f2a;font-weight:800}
.print-slot b{font-size:26px;font-size:8.4cqw;font-weight:600;line-height:1.05;min-height:1em}.print-slot small{font-size:11px;font-size:3.3cqw;font-weight:800;color:#5b4620;margin-top:2px;line-height:1}
.print-slot.set{border-style:solid;border-color:#2b2410;background:#fff}.print-slot.next{border-color:#d9a21b;background:#fff3c4;box-shadow:0 0 0 3px #ffd76a99}.print-slot.next small{color:#9a6b00}
.print-count{position:absolute;right:6px;bottom:6px;background:#15303ae6;color:#ffe9b8;font-size:12px;font-weight:800;padding:3px 8px;border-radius:10px}
#modal[data-point="printing"] .point-status{margin:0 0 8px}
.print-tiles button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:74px;min-height:84px;position:relative;font-size:1.75rem;line-height:1.1;padding:8px 10px}
.print-tiles button small{font-size:1.05rem;font-weight:800;color:#ffe9b8;margin-top:2px}.print-tiles button em{font-style:normal;font-size:11px;color:#a9f1d4;background:#15303a;border-radius:8px;padding:1px 6px;line-height:1.4}
.print-tiles button[disabled]{opacity:.55;cursor:not-allowed}.print-tiles button:focus-visible{outline:3px solid #ffe08a}
@media(max-width:600px){#modal[data-point="printing"] .print-desc{font-size:13px;line-height:1.5;margin-bottom:6px}.print-target{padding:6px 8px 8px;margin-bottom:8px}.print-target-head{font-size:13px;gap:4px 8px}.print-reading{font-size:15px}.print-tc{min-width:46px;padding:3px 4px}.print-tc b{font-size:26px}.print-tc small{font-size:13px}.print-tc i{font-size:11px}.print-arrow{font-size:18px}.print-tiles{gap:6px}.print-tiles button{min-width:0;flex:1 1 0;min-height:68px;font-size:1.4rem;padding:6px 4px}.print-tiles button small{font-size:.95rem}.print-tiles button em{font-size:10px}#modal[data-point="printing"] .point-status{margin-bottom:6px}}
/* printing · short portrait phones: the bench is shown at 2:1 (cover, centred) so the paper slots stay large; with the symmetric crop the paper band is y19.3–79.3% of the box. */
@media(max-width:600px) and (max-height:700px){.print-stage{aspect-ratio:2/1;margin-bottom:6px}.print-stage.has-art .print-bg{object-fit:cover;object-position:center}.print-paper{top:19.3%;height:60%}.print-target{margin-bottom:6px}}
/* printing · landscape tablets/PC and landscape phones: target + bench left, status + tiles right, so the paper and the tiles share the fold. */
@media(min-width:800px) and (orientation:landscape){#modal[data-point="printing"] .activity-main{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:6px 20px;align-items:start}#modal[data-point="printing"] .print-desc{grid-column:1/-1;margin-bottom:4px}#modal[data-point="printing"] .print-target{grid-column:1;grid-row:2;margin:0}#modal[data-point="printing"] .print-stage{grid-column:1;grid-row:3;margin:6px auto 0}#modal[data-point="printing"] .point-status{grid-column:2;grid-row:2;margin:0}#modal[data-point="printing"] .print-tiles{grid-column:2;grid-row:3;align-self:start;margin-top:6px}}
@media(orientation:landscape) and (max-height:520px){#modal[data-point="printing"] .activity-main{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 12px;align-content:start}#modal[data-point="printing"] .print-desc{grid-column:1/-1;margin:0 0 2px;font-size:13px;line-height:1.45}#modal[data-point="printing"] .print-target{grid-column:1;grid-row:2;margin:0;padding:5px 8px 7px}#modal[data-point="printing"] .print-tc{min-width:44px;padding:2px 4px}#modal[data-point="printing"] .print-tc b{font-size:24px}#modal[data-point="printing"] .print-tc small{font-size:12px}#modal[data-point="printing"] .print-arrow{font-size:16px}#modal[data-point="printing"] .print-stage{grid-column:1;grid-row:3;margin:4px auto 0;width:min(100%,max(240px,calc((100dvh - 236px)*2)));aspect-ratio:2/1}#modal[data-point="printing"] .print-stage.has-art .print-bg{object-fit:cover;object-position:center}#modal[data-point="printing"] .print-paper{top:19.3%;height:60%}#modal[data-point="printing"] .point-status{grid-column:2;grid-row:2;margin:0}#modal[data-point="printing"] .print-tiles{grid-column:2;grid-row:3;align-self:start;margin-top:4px;gap:6px}#modal[data-point="printing"] .print-tiles button{min-width:0;flex:1 1 40%;min-height:60px;font-size:1.3rem;padding:4px}#modal[data-point="printing"] .print-tiles button small{font-size:.9rem}}
@media(prefers-reduced-motion:reduce){.print-target.fresh{animation:none;box-shadow:0 0 0 4px #ffd76a99}}
