:root {
  color-scheme: light;
  --ink: #233f35;
  --paper: #fffdf4;
  --mint: #d2e5d7;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", system-ui, sans-serif;
  color: var(--ink);
  background: #ede9df;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button, .file-button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, .file-button:focus-within { outline: 3px solid #aa502a; outline-offset: 4px; }
#mast { border-bottom: 1px solid #c7c9bd; }
.mast-inner { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; min-height: 75px; padding: 10px 30px; gap: 16px; }
.brand { font: 760 25px/1.2 "Trebuchet MS", system-ui, sans-serif; letter-spacing: -.055em; display: flex; align-items: center; gap: 10px; }
.box-mark { background: #d79a58; border: 2px solid var(--ink); border-radius: 4px; display: inline-block; width: 26px; height: 23px; position: relative; transform: rotate(-5deg); }
.box-mark::before { content: ""; position: absolute; width: 5px; height: 9px; border: 1px solid var(--ink); border-top: 0; background: #f7ddac; left: 8px; }
.languages { display: inline-flex; gap: 2px; align-items: center; padding: 3px; border: 1px solid #aab6aa; border-radius: 8px; }
.languages button { color: var(--ink); background: transparent; border: 0; border-radius: 5px; padding: 4px 10px; min-height: 34px; cursor: pointer; font-size: 13px; font-weight: 650; }
.languages [aria-pressed="true"] { color: white; background: var(--ink); }
#launcher { width: min(100% - 40px, 664px); margin: clamp(28px,7vh,92px) auto 28px; }
.ticket { background: var(--paper); border: 1px solid #a4ab9c; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 0 #c7c9b9, 0 12px 22px #484d3d11; }
.ticket.dragging { outline: 3px dashed #396c54; outline-offset: 5px; }
.band { height: 10px; background: repeating-linear-gradient(118deg, #426c58 0 19px, #f8ecd2 19px 35px, #cc7756 35px 54px, #f8ecd2 54px 70px); }
.ticket-body { padding: clamp(24px,5vw,54px); }
.edition { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 750; letter-spacing: .04em; }
.route-dot { width: 10px; height: 10px; border-radius: 50%; background: #ab562d; }
h1 { margin: 18px 0 14px; font-size: clamp(33px,5vw,52px); letter-spacing: -.05em; line-height: 1.16; text-wrap: balance; }
.intro { max-width: 43ch; color: #405448; margin: 0; font-size: 15.5px; line-height: 1.8; }
.selection { margin-top: 30px; }
.file-button { background: #28583f; color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 13px 23px; position: relative; border: 1px solid #1c3f2b; border-radius: 7px; font-size: 16px; font-weight: 750; line-height: 1.55; }
.file-button:hover { background: #1d4831; }
.file-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.folder-mark { position: relative; border: 1.8px solid #fff5d5; width: 19px; height: 13px; border-radius: 2px; margin-top: 2px; }
.folder-mark::before { content: ""; position: absolute; width: 7px; height: 3px; left: -1.8px; top: -5px; border: 1.8px solid #fff5d5; border-bottom: 0; border-radius: 2px 3px 0 0; }
.filename { margin: 10px 0 0; color: #58655b; font: 13px/1.5 Consolas, Menlo, monospace; overflow-wrap: anywhere; }
#status { color: #93452c; margin: 14px 0 0; line-height: 1.65; font-weight: 650; font-size: 14px; }
#status:empty { display: none; }
#buy-full { color: #28583f; display: inline-block; margin-top: 9px; line-height: 1.6; font-size: 15px; font-weight: 700; text-underline-offset: 3px; }
.sample { margin-top: 24px; color: #405448; font-size: 14px; line-height: 1.6; }
.sample summary, .sample a { color: #335d48; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sample p { margin: 8px 0; }
.receipt { padding: 19px clamp(24px,5vw,54px) 22px; border-top: 1px dashed #93a493; background: #ecf1e6; }
.receipt strong { font-size: 14px; }
.receipt p { margin: 6px 0 0; line-height: 1.75; font-size: 13px; color: #445747; }
.foot { text-align: center; margin: 24px 0 0; color: #566355; font-size: 12px; }
body.playing { overflow: hidden; }
#play-area { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.play-toolbar { background: #233f35; color: #edf5e9; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(3px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 3px max(10px,env(safe-area-inset-left)); }
.play-toolbar button { background: transparent; border: none; color: #fff; font-size: 13px; min-height: 38px; padding: 6px; cursor: pointer; text-align: left; }
#save-state { font-size: 12px; line-height: 1.35; text-align: right; }
#game-frame { border: 0; width: 100%; display: block; min-height: 0; flex: 1; background: #f4f1e7; }
@media (max-width: 500px) {
  .mast-inner { min-height: 62px; padding: 6px 16px; }
  #launcher { width: calc(100% - 26px); }
  .ticket-body { padding: 28px 23px 26px; }
  .file-button { width: 100%; }
}
