*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;background:#2b2a27;overflow:hidden;touch-action:none;-webkit-user-select:none;user-select:none;
  font-family:"Hiragino Maru Gothic ProN","Hiragino Sans","Yu Gothic","Meiryo",sans-serif;color:#1d1b18}
#wrap{position:fixed;inset:0;display:flex;align-items:center;justify-content:center}
#stage{position:relative;width:390px;height:700px;transform-origin:center center;background:#f6f3ea;overflow:hidden}
#cv{position:absolute;inset:0;width:390px;height:700px;display:block}
.hide{display:none!important}

/* 上の帯 */
#hud{position:absolute;left:0;right:0;top:0;padding:8px 10px 6px;display:grid;
  grid-template-columns:auto 1fr auto;grid-template-areas:"clock papers speed" "gauge gauge gauge" "dist dist dist";
  gap:4px 10px;align-items:center;pointer-events:none;background:linear-gradient(#f6f3eaee 70%,#f6f3ea00)}
#clock{grid-area:clock;font-size:30px;font-weight:900;letter-spacing:1px;font-variant-numeric:tabular-nums}
#clock.over{color:#c2381f}
#papersBox{grid-area:papers;font-size:18px;font-weight:700;text-align:center}
#papers{font-size:26px;font-weight:900}
#speedBox{grid-area:speed;font-size:18px;font-weight:700}
#speedBox.slow{color:#c2381f}
#gauge{grid-area:gauge;height:9px;border:2px solid #1d1b18;border-radius:6px;overflow:hidden;background:#fff}
#gaugeIn{height:100%;width:0;background:#e8a33a}
#distBox{grid-area:dist;font-size:16px;font-weight:700;text-align:center}

/* 画面 */
.screen{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:16px}
#title{background:#f6f3ea}
.tcard,.lcard,.ecard{width:100%;max-width:358px;background:#fff;border:3px solid #1d1b18;border-radius:18px;
  padding:18px 16px;box-shadow:5px 6px 0 #1d1b18;text-align:center;max-height:100%;overflow-y:auto}
.tsub{font-size:18px;font-weight:700;color:#c2381f}
h1{font-size:46px;font-weight:900;letter-spacing:2px;margin:2px 0 8px}
.tdesc{font-size:17px;line-height:1.6;margin-bottom:12px}
.row-label{font-size:15px;font-weight:700;margin:10px 0 6px;color:#555}
.seg{display:flex;gap:6px}
.seg button{flex:1;font:inherit;font-size:17px;font-weight:700;padding:10px 4px;border:2px solid #1d1b18;border-radius:10px;background:#fff;color:#1d1b18}
.seg button.on{background:#1d1b18;color:#fff}
.vernote{font-size:14px;color:#555;margin-top:6px;min-height:20px;line-height:1.5}
button.big{display:block;width:100%;margin-top:14px;font:inherit;font-size:21px;font-weight:900;padding:14px;border:3px solid #1d1b18;
  border-radius:14px;background:#e8a33a;color:#1d1b18;box-shadow:3px 4px 0 #1d1b18}
button.big:active{transform:translate(2px,3px);box-shadow:1px 1px 0 #1d1b18}
button.small{display:block;width:100%;margin-top:10px;font:inherit;font-size:17px;font-weight:700;padding:10px;border:2px solid #1d1b18;border-radius:12px;background:#fff;color:#1d1b18}
.ver{font-size:13px;color:#888;margin-top:12px}

/* 3択 */
#level{background:#1d1b1866}
.lhead{font-size:21px;font-weight:900;margin-bottom:10px}
.choice{display:block;width:100%;text-align:left;font:inherit;border:3px solid #1d1b18;border-radius:14px;background:#fffdf6;
  padding:11px 12px;margin-top:9px;color:#1d1b18}
.choice:active{background:#ffe9c2}
.choice .cname{font-size:19px;font-weight:900}
.choice .clv{font-size:14px;font-weight:700;color:#c2381f;margin-left:4px}
.choice .cdesc{font-size:15px;line-height:1.5;margin-top:3px;color:#333}
.choice .ctag{display:inline-block;font-size:13px;font-weight:700;padding:1px 7px;border-radius:8px;background:#1d1b18;color:#fff;margin-right:6px}

/* 結末 */
#ending{background:#1d1b1899}
.etime{font-size:44px;font-weight:900;font-variant-numeric:tabular-nums}
.etitle{font-size:28px;font-weight:900;margin:2px 0 10px}
.etext{font-size:17px;line-height:1.7;margin-bottom:12px;text-align:left}
.estats{font-size:16px;line-height:1.7;text-align:left;border-top:2px dashed #1d1b18;padding-top:10px}

/* 案内 */
#rotate{position:fixed;inset:0;z-index:50;background:#1d1b18;color:#fff;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;padding:20px;text-align:center}
.hint{position:absolute;left:10px;right:10px;top:10px;z-index:20;background:#fff8d8;border:2px solid #1d1b18;border-radius:12px;padding:10px 40px 10px 12px;font-size:15px;line-height:1.5}
.hint .x{position:absolute;right:6px;top:6px;width:30px;height:30px;font-size:18px;border:none;background:none}

/* 文字の大きさ */
#stage.fz1 .tcard,#stage.fz1 .lcard,#stage.fz1 .ecard{zoom:1.15}
#stage.fz2 .tcard,#stage.fz2 .lcard,#stage.fz2 .ecard{zoom:1.3}
#stage.fz1 #hud{zoom:1.1}
#stage.fz2 #hud{zoom:1.2}
#stage.fz1 .tcard,#stage.fz1 .lcard,#stage.fz1 .ecard{max-width:311px}
#stage.fz2 .tcard,#stage.fz2 .lcard,#stage.fz2 .ecard{max-width:275px}
#stage.fz1 h1{font-size:40px}
#stage.fz2 h1{font-size:34px}
#stage.fz2 .tdesc{font-size:16px}
.seg button{white-space:nowrap}
#stage.fz2 .seg button{font-size:15px}
.hint.bottom{top:auto;bottom:10px}
