/* Letters from Hibari - small cards with a dark outline, in a pixel font. */
:root { --ink: #2b2622; --paper: #fbf4e4; --paper2: #f1e6cc; --red: #d1402a; --muted: #8a7a66; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #326eae; font-family: 'DotGothic16', monospace; color: var(--ink); }
#game, #gl { position: fixed; left: 0; top: 0; image-rendering: pixelated; image-rendering: crisp-edges; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui button, #ui .cardwrap.on, #ui .btns { pointer-events: auto; }
#loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #326eae; z-index: 100; }
/* the loading screen (0.266v): moves on its own (compositor animations), even while the island is being built */
.ld-card { background: #fbf4e4; border: 3px solid #2b2622; border-radius: 8px; box-shadow: 5px 5px 0 rgba(30, 24, 20, .3); padding: 22px 34px 18px; text-align: center; color: #2b2622; min-width: 300px; }
.ld-title { font-size: 30px; }
.ld-sub { font-size: 14px; color: #8a7a66; margin-top: 4px; }
.ld-scene { position: relative; height: 104px; margin: 14px 0 6px; overflow: hidden; }
.ld-moped { position: absolute; left: 50%; bottom: 14px; margin-left: -48px; image-rendering: pixelated; animation: ld-bob .5s steps(2) infinite; }
.ld-road { position: absolute; left: 0; right: 0; bottom: 6px; height: 8px; background: repeating-linear-gradient(90deg, #5c6268 0 14px, #e6e2d6 14px 22px, #5c6268 22px 36px); background-size: 36px 8px; border-top: 3px solid #5c6268; animation: ld-road .45s linear infinite; }
.ld-mail { position: absolute; left: 50%; bottom: 50px; margin-left: -70px; }
.ld-mail i { position: absolute; width: 14px; height: 10px; background: #fbf4e4; border: 2px solid #2b2622; opacity: 0; animation: ld-mail 2.4s linear infinite; }
.ld-mail i::after { content: ''; position: absolute; left: 1px; top: 0; width: 8px; height: 6px; border: 2px solid #2b2622; border-top: 0; border-left: 0; transform: rotate(45deg) translate(-1px, -3px); }
.ld-mail i:nth-child(2) { animation-delay: .8s; left: -16px; }
.ld-mail i:nth-child(3) { animation-delay: 1.6s; left: 12px; }
.ld-msg { font-size: 13px; color: #8a7a66; }
@keyframes ld-bob { 0% { transform: translateY(0); } 100% { transform: translateY(-2px); } }
@keyframes ld-road { from { background-position: 0 0; } to { background-position: -36px 0; } }
@keyframes ld-mail { 0% { opacity: 0; transform: translate(0, 10px) rotate(-8deg); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-60px, -46px) rotate(12deg); } }
.card { background: var(--paper); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 4px 4px 0 rgba(30, 24, 20, .28); padding: 10px 14px; }
.card.small { padding: 3px 9px; font-size: 15px; border-width: 2px; box-shadow: 2px 2px 0 rgba(30, 24, 20, .25); }
.row { display: flex; align-items: center; gap: 6px; }
.ico { image-rendering: pixelated; vertical-align: middle; }
.hud { position: absolute; left: 14px; top: 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.miniwrap { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mini { width: 168px; height: 168px; image-rendering: auto; }
.clock { font-size: 14px; }
.keys { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); font-size: 13px; color: rgba(251, 244, 228, .85); text-shadow: 1px 1px 0 rgba(0, 0, 0, .5); }
.btns { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; }
.btn { font-family: inherit; font-size: 15px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 5px; padding: 4px 10px; cursor: pointer; box-shadow: 2px 2px 0 rgba(30, 24, 20, .3); display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: #fff8ea; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(30, 24, 20, .3); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.small { font-size: 13px; padding: 2px 8px; }
kbd { font-family: inherit; font-size: 11px; border: 1px solid var(--ink); border-radius: 3px; padding: 0 4px; background: var(--paper2); }
.tags .tag { position: absolute; left: 0; top: 0; transform-origin: 0 0; margin: -14px 0 0 -40px; white-space: nowrap; font-size: 13px; background: var(--paper); border: 2px solid; border-radius: 12px; padding: 1px 8px; box-shadow: 2px 2px 0 rgba(0, 0, 0, .2); }
.tags .tag i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; border: 1px solid var(--ink); }
.tags .tag.faint { opacity: .75; }
.talk .bubble { position: absolute; left: 0; top: 0; max-width: 300px; background: #fffdf6; border: 2px solid var(--ink); border-radius: 10px; padding: 4px 10px; font-size: 15px; line-height: 1.3; box-shadow: 2px 2px 0 rgba(0, 0, 0, .2); }
.talk .bubble b { display: block; font-size: 12px; color: var(--red); }
.talk .bubble::after { content: ''; position: absolute; left: 50%; bottom: -8px; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.toasts { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.toast { display: flex; align-items: center; gap: 6px; transition: opacity .4s, transform .4s; animation: rise .35s ease-out; }
.toast.out { opacity: 0; transform: translateY(-8px); }
.toast .coins { color: #8a5a10; }
.placeToast { font-size: 20px; padding: 6px 18px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.pop { animation: stamp .45s cubic-bezier(.3, 1.6, .5, 1) both; }
.pop.d1 { animation-delay: .18s; } .pop.d2 { animation-delay: .36s; }
@keyframes stamp { from { transform: scale(2.2) rotate(-14deg); opacity: 0; } }
.cardwrap { position: absolute; inset: 0; display: none; pointer-events: none; }
.cardwrap.on { display: flex; }
.cardwrap.center { align-items: center; justify-content: center; background: rgba(20, 18, 30, .35); }
.cardwrap.side { align-items: center; justify-content: flex-start; padding-left: 4vw; }
.cardwrap.bottom { align-items: flex-end; justify-content: center; padding-bottom: 7vh; }
.card.wide { width: min(520px, 92vw); max-height: 86vh; overflow: auto; }
.card .title { font-size: 19px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.card .sub { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.card .muted, .muted { color: var(--muted); }
.strip { display: flex; align-items: center; gap: 10px; border-top: 2px dashed rgba(43, 38, 34, .25); padding: 8px 0; }
.strip .grow { flex: 1; font-size: 15px; line-height: 1.3; }
.strip small { font-size: 12px; color: #5a4a3a; }
.strip .right { text-align: right; font-size: 13px; }
.strip .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); flex: none; }
.strip.blue { background: rgba(74, 138, 208, .12); border-radius: 6px; padding: 8px; }
.strip.test { color: #5a6a8a; font-size: 13px; }
.meter { display: flex; align-items: center; gap: 6px; font-size: 11px; margin-top: 3px; }
.meter i { width: 90px; height: 7px; border: 1px solid var(--ink); background: #fff; display: inline-block; }
.meter i b { display: block; height: 100%; background: #e98b2f; }
.foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.card.scene { width: min(620px, 92vw); font-size: 20px; line-height: 1.4; padding: 12px 18px 8px; }
.card.scene .who { font-size: 14px; color: var(--red); }
.card.scene p { margin: 4px 0 6px; }
.card.scene.narr { background: #f3ead6; font-style: normal; }
.card.scene .hint { font-size: 11px; color: var(--muted); text-align: right; }
.card.letter { width: min(460px, 92vw); }
.card.letter .paper { background: #fffaf0 repeating-linear-gradient(transparent 0 27px, rgba(80, 110, 160, .18) 27px 28px); padding: 18px 20px; font-size: 18px; line-height: 28px; border: 1px solid #d8ccb4; }
.card.letter .sig { text-align: right; margin-top: 6px; }
.card.map canvas { width: min(820px, 86vw); height: auto; display: block; border: 2px solid var(--ink); background: #efe2c4; }
.sign { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); font-size: 14px; }
.sign .title { font-size: 12px; color: var(--muted); }
.sign .srow { display: flex; align-items: center; gap: 8px; }
.sign .arr { display: inline-block; width: 16px; text-align: center; color: var(--red); }
.btn.auto.on { background: #ffd23f; }
.strip.picked { background: rgba(255, 210, 63, .18); border-radius: 6px; }
.strip .addr { cursor: pointer; text-decoration: underline dotted; pointer-events: auto; }
.swatches { display: flex; gap: 6px; margin-top: 4px; }
.swatch { width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 50%; cursor: pointer; position: relative; padding: 0; }
.swatch.on { box-shadow: 0 0 0 3px #ffd23f; }
.swatch i { position: absolute; right: -6px; bottom: -6px; font-style: normal; font-size: 10px; background: var(--paper); border: 1px solid var(--ink); border-radius: 6px; padding: 0 3px; }
.tagon { font-size: 12px; background: #e8f4dc; border: 1px solid var(--ink); border-radius: 4px; padding: 1px 6px; }
.strip.sub2 { padding-left: 12px; }
.pagebtns { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.card.letter .paper.practice { font-size: 17px; color: #2a3a6a; background-color: #fbf6ea; }
.bigcard { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); font-size: 30px; padding: 18px 34px; animation: rise .8s ease-out; }
.card.ending { width: min(560px, 92vw); text-align: center; }
.card .title.big { font-size: 26px; justify-content: center; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.tile { border: 2px solid var(--ink); border-radius: 6px; padding: 8px 4px; background: var(--paper2); }
.tile b { display: block; font-size: 24px; }
.tile span { font-size: 12px; color: var(--muted); }
.hint { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; }
.card.helmetcard { text-align: center; width: min(380px, 92vw); }
.helmetcv { width: 260px; height: 260px; cursor: grab; image-rendering: auto; }
.stk { width: 54px; height: 40px; border-radius: 3px; image-rendering: pixelated; }
.muted.small, p.small { font-size: 12px; }
.stick { position: absolute; left: 24px; bottom: 24px; width: 140px; height: 140px; border-radius: 50%; background: rgba(251, 244, 228, .25); border: 3px solid rgba(43, 38, 34, .6); pointer-events: auto; touch-action: none; }
.stick .knob { position: absolute; left: 45px; top: 45px; width: 50px; height: 50px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); }
.honkbtn { position: absolute; right: 24px; bottom: 70px; width: 84px; height: 84px; border-radius: 50%; justify-content: center; font-size: 16px; touch-action: none; }
.strip.veh .stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 3px; }
.sbar { display: inline-block; width: 46px; height: 6px; border: 1px solid var(--ink); background: #fff; margin-left: 4px; vertical-align: middle; }
.sbar b { display: block; height: 100%; background: #5aa0c8; }
.cargo { display: grid; gap: 4px; margin: 8px 0; max-width: 420px; }
.cargo.small { max-width: 240px; gap: 3px; }
.cargo .box { aspect-ratio: 1; border: 2px dashed rgba(43, 38, 34, .45); border-radius: 4px; background: #f6edd8; display: flex; align-items: center; justify-content: center; cursor: pointer; pointer-events: auto; }
.cargo .box.full { border-style: solid; border-color: var(--ink); }
.cargo .box.sel { box-shadow: 0 0 0 3px #ffd23f; }
.cargo.small .box { cursor: default; }
.rack { font-size: 12px; color: var(--muted); }
.card.cargocard { width: min(480px, 92vw); }
.card.fit { max-height: calc(100vh - 40px); overflow: auto; width: min(1000px, 96vw); }
.card.fit .strip { padding: 4px 0; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 5px; margin: 6px 0; }
.vtile { display: flex; gap: 6px; align-items: center; border: 2px solid rgba(43, 38, 34, .25); border-radius: 6px; padding: 3px 6px; font-size: 13px; }
.vtile .btn.small { padding: 1px 6px; font-size: 12px; }
.vtile .tagon { font-size: 11px; }
.vtile.picked { background: rgba(255, 210, 63, .18); border-color: var(--ink); }
.vtile .grow { flex: 1; }
.vtile .stats { display: flex; gap: 6px; font-size: 10px; color: var(--muted); margin: 1px 0; flex-wrap: wrap; }
.vtile .sbar { width: 30px; }
.vpic { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; flex: none; }
.vpic.big { width: 140px; height: 140px; }
.side2 { display: flex; gap: 14px; align-items: center; }
.seg { display: flex; gap: 4px; }
.btn.on { background: #ffd23f; }
.eqbtns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 10px 0; }
.eqbtns .btn { justify-content: center; text-align: center; min-height: 52px; }
.card.endtest { width: min(560px, 92vw); }
.side2 .grow { flex: 1; min-width: 260px; }
.side2 .cargo { max-width: none; }
.dot.small { width: 9px; height: 9px; display: inline-block; border-radius: 50%; border: 1px solid var(--ink); margin-right: 2px; }
.strip.pickable { cursor: pointer; pointer-events: auto; border-radius: 6px; }
.strip.pickable:hover { background: rgba(255, 210, 63, .12); }
/* the station card: a map to pick from, and the list beside it */
.card.stationcard { width: min(860px, 96vw); max-height: 92vh; overflow: auto; }
.stwrap { display: flex; gap: 12px; align-items: flex-start; margin-top: 6px; }
.stmap { width: 560px; max-width: 64vw; height: auto; aspect-ratio: 4 / 3; border: 2px solid var(--ink); border-radius: 6px; image-rendering: auto; pointer-events: auto; background: #efe6d2; }
.stlist { flex: 1; min-width: 170px; max-height: 430px; overflow: auto; }
.stlist .strip { padding: 5px 0; }
.stlist .strip.hot { background: rgba(242, 201, 76, .35); }
/* the cargo grid (0.226v): parcels as blocks across their boxes, drag and drop */
.cargo { grid-auto-rows: 54px; }
.cargo.small { grid-auto-rows: 30px; }
.cargo .box { aspect-ratio: auto; }
.cargo .box.ok { background: #cfe9c0; border-color: #3f8a3a; border-style: solid; }
.cargo .box.no { background: #f3c7bd; border-color: #b0402e; border-style: solid; }
.cargo .pc { position: relative; border: 2px solid var(--ink); border-radius: 5px; display: flex; align-items: center; gap: 6px; padding: 0 6px; overflow: hidden; cursor: grab; pointer-events: auto; box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); touch-action: none; }
.cargo .pc.sel { box-shadow: 0 0 0 3px #ffd23f, inset 0 -4px 0 rgba(0,0,0,.15); }
.cargo .pc .tag { font-style: normal; font-size: 11px; background: rgba(255,250,238,.9); border: 1px solid var(--ink); border-radius: 3px; padding: 0 3px; }
.cargo .pc .nm { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fffaee; text-shadow: 0 1px 0 rgba(0,0,0,.5); }
.cargo.small .pc { padding: 0 3px; gap: 2px; cursor: default; }
.load { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 6px; }
.loadbar { display: flex; gap: 2px; flex: 1; max-width: 240px; }
.loadbar b { flex: 1; height: 8px; border: 1px solid var(--ink); border-radius: 2px; background: #f6edd8; }
.loadbar b.on { background: #d1402a; }
.cargotools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.strip[data-job] { cursor: grab; touch-action: none; }
.dragghost { position: fixed; z-index: 99; pointer-events: none; padding: 4px 8px; display: flex; align-items: center; gap: 6px; opacity: .92; }
/* the big map (0.227v): key, zoom buttons */
.mapwrap { position: relative; }
.mapwrap canvas.paper { cursor: grab; pointer-events: auto; touch-action: none; display: block; }
.mapkey { position: absolute; right: 8px; top: 8px; background: rgba(251, 244, 228, .94); border: 2px solid var(--ink); border-radius: 5px; padding: 4px 8px; font-size: 12px; pointer-events: auto; min-width: 120px; }
.mapkey.off .keyrow { display: none; }
.mapkey .keyhead { font-weight: bold; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.mapkey .keyrow { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 1px 0; }
.mapkey .keyrow.hid { opacity: .4; text-decoration: line-through; }
.km { width: 10px; height: 10px; display: inline-block; border: 1px solid var(--ink); flex: none; }
.km-boxes { background: #d1402a; } .km-parcels { background: #f2c94c; border-radius: 50%; } .km-torii { background: #d1402a; border-color: #d1402a; }
.km-stations { background: #fffaee; border-radius: 2px; } .km-trains { background: #6ab33c; height: 5px; border-radius: 3px; } .km-rail { border: none; border-top: 2px dashed #6ab33c; height: 0; opacity: .6; }
.km-ports { background: #2b5aa8; transform: rotate(45deg) scale(.8); } .km-names { border: none; } .km-names::before { content: 'Aa'; font-size: 10px; }
.zoombtns { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; pointer-events: auto; }
/* shed tiles (0.236v): speed and pick-up on one line, boxes always on the next, so every tile reads the same */
.vtile .stats span:last-child { flex-basis: 100%; }
/* comfort (0.241v) */
#ui.carding .miniwrap, #ui.carding .btns, #ui.carding .keys, #ui.carding .hint { opacity: 0; pointer-events: none !important; }
#ui.carding .miniwrap { visibility: hidden; }
.card.scene .hint { position: static; transform: none; display: block; margin-top: 4px; }
.card.map { max-height: 96vh; display: flex; flex-direction: column; }
.card.map canvas.paper { max-width: 100%; max-height: calc(96vh - 110px); width: auto; height: auto; }
.card.wide, .card.stationcard, .card.shed { max-height: 94vh; overflow: auto; }
.card .foot.sticky { position: sticky; bottom: -10px; background: var(--paper); padding: 6px 0 2px; }
.card.bag { max-height: 92vh; overflow: auto; }
.cardwrap.dim { background: rgba(20, 18, 30, .5); }
.card.titlecard { width: min(460px, 92vw); text-align: center; }
.card.titlecard .title.big { font-size: 30px; margin: 6px 0; }
.titlebtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 6px; }
.titlebtns .btn.big { grid-column: 1 / -1; justify-content: center; font-size: 18px; padding: 8px; }
.titlebtns .btn { justify-content: center; }
.keylist { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 10px 0; text-align: left; font-size: 14px; }
.keylist div { display: flex; gap: 10px; align-items: center; }
.keylist kbd { min-width: 110px; text-align: center; }
.talk .bubble { max-width: 480px; }
/* the note window (0.254v) */
.card.notecard { width: min(760px, 94vw); }
.notewrap { display: flex; gap: 12px; align-items: flex-start; margin-top: 8px; }
.noteshot { width: 260px; max-width: 38%; border: 2px solid var(--ink); border-radius: 4px; image-rendering: pixelated; }
.notecard .lbl { font-size: 13px; color: var(--muted); margin: 6px 0 3px; }
.notecard .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.notecard .chip.on { background: var(--ink); color: var(--paper); }
.notetext { width: 100%; margin-top: 8px; font: 15px inherit; font-family: inherit; border: 2px solid var(--ink); border-radius: 5px; padding: 6px; background: #fffdf6; resize: vertical; pointer-events: auto; }
@media (max-width: 600px) { .notewrap { flex-direction: column; } .noteshot { max-width: 100%; width: 100%; } }
/* the frame meter (test mode, 0.257v) */
.fmeter { position: fixed; left: 12px; bottom: 34px; width: 248px; padding: 5px 6px; font-size: 11px; line-height: 1.35; pointer-events: auto; }
.fmeter canvas { display: block; width: 240px; height: 50px; background: var(--paper); image-rendering: pixelated; border: 1px solid var(--paper2); }
.fmeter i { display: inline-block; width: 7px; height: 7px; margin: 0 3px 0 4px; border: 1px solid var(--ink); }
.fmeter .mwarn { color: var(--red); font-weight: bold; }
.fmeter .btn.small { margin-top: 3px; font-size: 11px; padding: 1px 6px; }
/* music and sound volumes on the title card (0.261v) */
.vols { margin: 12px 0 2px; display: grid; gap: 6px; }
.volrow { display: flex; align-items: center; gap: 6px; }
.vollbl { width: 58px; font-size: 14px; }
.volrow .btn.small { padding: 0 8px; min-width: 26px; justify-content: center; }
.volbar { display: inline-flex; gap: 3px; }
.volbar i { width: 12px; height: 16px; border: 2px solid var(--ink); border-radius: 2px; background: var(--paper2); cursor: pointer; pointer-events: auto; }
.volbar i.on { background: #e98b2f; }
.volnum { width: 40px; text-align: right; font-size: 13px; color: var(--muted); }
/* the postmark book (0.261v) */
.booktab { display: flex; align-items: center; gap: 10px; background: var(--paper2); border: 2px solid var(--ink); border-radius: 6px; padding: 4px 8px; margin: 6px 0 8px; }
.pmthumb { width: 48px; height: 48px; }
.card.bookcard { max-width: min(860px, 96vw); }
.bookcard canvas.book { display: block; width: min(820px, 90vw); height: auto; pointer-events: auto; } /* the book picture brings its own edges (0.262v) */
.bookcard canvas.book.inking { cursor: crosshair; }
/* Pip's backpack: the bag (0.262v) */
.backpack { position: relative; width: min(92vw, 1080px, calc(80vh * 1.5)); aspect-ratio: 3 / 2; pointer-events: auto; }
.bp-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.bp-lining { position: absolute; left: 17%; top: 29%; right: 22%; bottom: 15%; display: flex; gap: 3%; }
.bp-book { flex: 0 0 23%; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding-top: 2%; }
.bp-book img { width: 100%; transform: rotate(-4deg); filter: drop-shadow(3px 4px 0 rgba(40, 30, 20, .3)); transition: transform .15s; }
.bp-book:hover img { transform: rotate(-2deg) translateY(-3px); }
.bp-book small { font-size: 12px; color: var(--ink); background: rgba(251, 244, 228, .9); border-radius: 8px; padding: 0 6px; }
.bp-main { flex: 1; overflow-y: auto; overflow-x: hidden; padding-right: 4px; }
.bp-main .title { font-size: 17px; margin-bottom: 2px; }
.bp-main .strip { background: rgba(251, 244, 228, .85); border-radius: 6px; padding: 3px 6px; margin: 3px 0; }
.backpack .cargo { max-width: none; grid-auto-rows: 64px; gap: 6px; }
.backpack .cargo .box { background: url(assets/ui/backpack-space.png) center / 100% 100% no-repeat; border: none; border-radius: 10px; }
.backpack .cargo .box.full { border: none; }
.backpack .cargo .pc { margin: 7px; border-radius: 6px; border: 2px solid var(--ink); }
.bp-bar { position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.btn.plain { cursor: default; }
.bagicon { width: 26px; height: auto; vertical-align: middle; }

