:root{color-scheme:dark;--ink:#132728;--deep:#0d1e20;--paper:#f3e8cb;--gold:#ddbd83;--edge:#52615a;--muted:#a9b5a8;--serif:Georgia,"Times New Roman",serif;--sans:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--deep);color:var(--paper);font-family:var(--sans)}body{background:radial-gradient(ellipse at 50% 0%,#1f3433,transparent 72%),#102223}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible{outline:3px solid #f5c369;outline-offset:3px}button:disabled{opacity:.5;cursor:default}button:hover{filter:brightness(1.12)}[hidden]{display:none!important}.defs{position:absolute;width:0;height:0;overflow:hidden}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round;vertical-align:middle}
#app{max-width:1700px;margin:auto;padding:0 clamp(20px,3.65vw,72px)}.mast{min-height:83px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #64716483;gap:15px}.brand{display:flex;align-items:center;gap:11px;color:var(--gold)}.sun-logo{width:49px;height:43px;stroke-width:1.4}.brand div{display:flex;flex-direction:column;align-items:center}.brand b{font:600 25px/.96 Baskerville,Georgia,serif;letter-spacing:.115em}.brand span{font:600 8.5px/1.8 Avenir,Arial,sans-serif;letter-spacing:.36em}.head-tools{display:flex;gap:12px;align-items:center}.head-tools button,.hud-tools button{white-space:nowrap;border:1px solid #71807575;background:transparent;border-radius:4px;display:flex;gap:9px;align-items:center;justify-content:center;min-height:38px;padding:0 14px;font-weight:500;font-size:13px;letter-spacing:.06em}.head-tools svg{width:16px;height:16px;color:var(--gold)}
.poster{isolation:isolate;position:relative;overflow:hidden;min-height:500px;height:clamp(495px,65svh,750px);margin-top:20px;background:#14282b;border:1px solid #ac976b88}.scenery,.shade,.poster-frame{position:absolute;inset:0;pointer-events:none}.scenery{left:20%;background:url(../assets/keyart.webp?ver=20261126-2) 58% 55%/cover no-repeat;z-index:-3}.shade{z-index:-2;background:linear-gradient(90deg,#142829 0%,rgba(20,40,41,.988) 17%,rgba(20,40,41,.91) 27%,rgba(20,40,41,.72) 37%,rgba(20,40,41,.24) 51%,transparent 63%),linear-gradient(0deg,#071d2147,transparent 18%)}.poster-frame{inset:10px;border:1px solid #d6b77a60;z-index:1}.poster-frame i{position:absolute;width:21px;height:21px;border-color:var(--gold);border-style:solid;border-width:2px 0 0 2px;left:4px;top:4px;opacity:.88}.poster-frame i:after{content:"";position:absolute;width:4px;height:4px;top:3px;left:3px;background:var(--gold);transform:rotate(45deg)}.poster-frame i:nth-child(2){left:auto;right:4px;transform:rotate(90deg)}.poster-frame i:nth-child(3){top:auto;bottom:4px;transform:rotate(-90deg)}.poster-frame i:nth-child(4){left:auto;top:auto;right:4px;bottom:4px;transform:rotate(180deg)}
.hero-copy{height:100%;width:47%;padding:28px 0 32px clamp(36px,4.45vw,80px);display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.hero-copy h1{margin:0;width:100%}.hero-copy img{width:clamp(272px,min(28vw,43svh),465px);max-width:98%;height:auto;display:block}.english{margin:13px 0 0;color:var(--gold);letter-spacing:.20em;font:500 clamp(11px,1.06vw,16px)/1.3 Georgia,serif;letter-spacing:.21em}.premise{margin:24px 0;color:#e2e0d2;font-size:clamp(13px,1.06vw,17px);line-height:1.95;letter-spacing:.038em;text-shadow:0 1px 5px #102223}.board{border:1px solid #efcf91;color:#182925;background:linear-gradient(110deg,#ecd5a4,#d6b77d);position:relative;display:flex;align-items:center;gap:14px;min-height:54px;min-width:218px;padding:0 22px;font-weight:650;font-size:17px;letter-spacing:.13em;border-radius:3px;box-shadow:0 4px 12px #04161650}.board:after{content:"";position:absolute;inset:3px;border:1px solid #856c424d;border-radius:1px;pointer-events:none}.board svg{width:23px}.board .go{width:18px;margin-left:auto}.fresh{border:0;background:none;text-decoration:underline;text-underline-offset:4px;font-size:13px;color:#e2ceab;margin-top:9px}
.pass{margin-top:18px;position:relative;display:flex;background-color:#e6d8b7;background-image:repeating-linear-gradient(105deg,#95764e08 0px,#95764e08 1px,transparent 1px,transparent 5px);color:#2c3a32;border-radius:5px;filter:drop-shadow(0 4px 4px #0002);min-height:111px;overflow:hidden;isolation:isolate}.pass:before,.pass:after{content:"";z-index:2;border-radius:50%;background:#112425;position:absolute;width:22px;height:22px;top:calc(50% - 11px);left:-11px}.pass:after{left:auto;right:-11px}.pass-main{display:flex;align-items:center;gap:clamp(20px,4vw,88px);flex:1;min-width:0;padding:18px clamp(24px,3.3vw,64px)}.pass-heading{display:flex;gap:18px;align-items:center;flex-shrink:0}.pass-heading svg{width:33px;height:41px;stroke-width:1.25}.pass-heading span,.stub small{display:block;color:#5c5b47;font:600 10px/1.5 Avenir,Arial,sans-serif;letter-spacing:.19em}.pass-heading h2{font:600 24px/1.3 var(--serif);margin:3px 0 0;letter-spacing:.13em}.route{display:flex;align-items:center;justify-content:center;flex:1;gap:clamp(8px,1.8vw,35px)}.stop{display:grid;grid-template-columns:min-content max-content;align-items:center;column-gap:9px}.stop span{border:1px solid #8b8771;display:grid;place-items:center;border-radius:50%;width:23px;height:23px;font:12px Georgia,serif;grid-column:1;grid-row:1}.stop b{font:600 clamp(15px,1.32vw,23px)/1.45 var(--serif);letter-spacing:.08em;grid-column:2;grid-row:1}.stop small{grid-column:2;grid-row:2;font:600 9px Avenir,Arial,sans-serif;color:#6b6957;letter-spacing:.18em;margin-top:4px}.route i{flex:1;min-width:13px;max-width:85px;border-top:1px solid #92917a;position:relative}.route i:before,.route i:after{content:"";position:absolute;background:#777a66;width:4px;height:4px;border-radius:50%;top:-2.5px;left:0}.route i:after{right:0;left:auto}.stub{width:18%;min-width:155px;max-width:270px;border-left:2px dashed #92867088;display:flex;align-items:center;justify-content:center;gap:18px;position:relative;padding:14px}.stub:before,.stub:after{content:"";position:absolute;left:-9px;top:-9px;width:16px;height:16px;background:#102323;border-radius:50%}.stub:after{top:auto;bottom:-9px}.stub small{font:500 11px/1.5 var(--sans);letter-spacing:.15em}.stub b{font:22px Georgia,serif;letter-spacing:.07em;white-space:nowrap}.barcode{height:46px;width:41px;background:repeating-linear-gradient(90deg,#354035 0 1px,transparent 1px 3px,#354035 3px 6px,transparent 6px 7px,#354035 7px 9px,transparent 9px 12px,#354035 12px 13px,transparent 13px 16px)}
.page-foot{padding:12px 0 14px;color:#a6b2a3;font-size:12px;line-height:1.7;letter-spacing:.05em;text-align:center}.foot-notes{display:flex;justify-content:center;flex-wrap:wrap;gap:4px 18px;margin-bottom:4px}.page-foot span{display:inline-flex;align-items:center;gap:8px}.page-foot svg{width:14px;height:14px}.page-foot b{font-weight:600;color:var(--gold);font-variant-numeric:tabular-nums}.page-foot a{color:#d9c59c;text-underline-offset:3px}.page-foot .sgh-altsite{display:inline;white-space:nowrap}.fresh{background:none;border:0;color:inherit}
#play{padding:15px 0 12px}.viewport{position:relative;isolation:isolate;overflow:hidden;border:1px solid #887b5f;min-height:260px;height:calc(100svh - 207px);background:#152326}.playing .mast{min-height:60px}.playing .brand b{font-size:19px}.playing .sun-logo{width:36px}.playing .brand span{font-size:7px}#world{display:block;width:100%;height:100%;touch-action:none;outline:none}.view-vignette{position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 48px #32160020}#code{color:var(--gold);font:bold 10px/1 Avenir,Arial,sans-serif;letter-spacing:.19em}#scene-clock{position:absolute;top:12px;right:16px;display:flex;gap:6px;align-items:center;padding:4px 8px;border-radius:3px;background:#122528b8;color:#f1ead7;font:16px ui-monospace,monospace;pointer-events:none}#scene-clock svg{width:16px}.turn{position:absolute;top:53%;transform:translateY(-50%);width:44px;height:52px;border-radius:3px;background:#122528a8;border:1px solid #cbb17a9c;display:grid;place-items:center;color:#eed5a5}.turn svg{width:22px;height:22px}#left{left:12px}#left svg{transform:rotate(180deg)}#right{right:12px}#targets{position:absolute;inset:0;pointer-events:none}.focus-target{position:absolute;transform:translate(-50%,-50%);border:0;opacity:0;pointer-events:none;overflow:hidden;width:1px;height:1px}.focus-target:focus-visible{width:28px;height:28px;padding:0;background:transparent;border:1px solid #182d29;border-radius:50%;outline:2px solid #ffe2a6;outline-offset:1px;opacity:1;z-index:5}
#feedback{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);padding:9px 17px;border-radius:4px;background:#122323ed;box-shadow:0 2px 8px #0003;border:1px solid #ddbd8366;font-size:14px;text-align:center;max-width:calc(100% - 32px);width:max-content;pointer-events:none}#feedback:empty{display:none}#scene-failure{position:absolute;inset:35% 10% auto;background:var(--deep);padding:24px;border:1px solid var(--gold);text-align:center}
.rail-hud{min-height:74px;padding:9px 16px;display:flex;gap:12px;align-items:center;justify-content:space-between;border:1px solid #53645a;background:#1c302e;margin-top:9px}.luggage,.luggage>span,.hud-tools{display:flex;align-items:center;gap:10px}.luggage>span{font:600 13px var(--sans);color:#d6c59f;white-space:nowrap}.luggage>span svg{width:19px}.hud-tools button{min-height:40px;padding:0 12px}.hud-tools svg{width:17px;color:var(--gold)}#items{display:flex;gap:6px;align-items:center}.slot{padding:0;border:1px solid #51655b;width:46px;height:46px;background:#102221;border-radius:3px;display:grid;place-items:center}.slot.empty:after{content:"";width:4px;height:4px;transform:rotate(45deg);background:#42554c}.slot.selected{border-color:#edc277;background:#454737}.item-art{display:inline-block;width:40px;height:40px;background:url(../assets/items.webp) var(--pos,0%) 50%/500% 100% no-repeat}.slot[data-item=punch],.item-art[data-item=punch]{--pos:25%}.slot[data-item=key],.item-art[data-item=key]{--pos:50%}.slot[data-item=lens],.item-art[data-item=lens]{--pos:75%}.slot[data-item=punched],.item-art[data-item=punched]{--pos:100%}
dialog{padding:0;color:var(--paper);border:1px solid #b0976c;width:min(490px,92vw);top:var(--sgh-top,0px);bottom:var(--ad-space,0px);max-height:calc(100svh - var(--sgh-top,0px) - var(--ad-space,0px) - 24px);overscroll-behavior:contain;background:#1b302f;box-shadow:0 20px 80px #0008;border-radius:4px}dialog::backdrop{background:#071519a6;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);bottom:var(--ad-space,0px)}.dialog-card{padding:30px;position:relative}.dialog-card:before{content:"";position:absolute;inset:6px;border:1px solid #bea0744a;pointer-events:none}.dialog-card h2{font:600 26px var(--serif);letter-spacing:.08em;margin:12px 0 20px}.dialog-card p,.dialog-card li{font-size:15px;line-height:1.8;color:#e0decf}.dialog-card ol{padding-left:1.5em}.dialog-card kbd{padding:1px 4px;font:13px monospace;border:1px solid #819185;border-radius:2px}.dialog-card a{color:#e2c894}#dialog-close{position:absolute;right:14px;top:14px;border:0;background:transparent;padding:5px;color:#c3ccbc}#clear-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}#clear-buttons button{padding:11px 17px;border:1px solid #728275;border-radius:3px;background:#243b36;color:var(--paper);font-size:14px}#clear-buttons button:first-child{background:#dac091;color:#172b28;border-color:#dac091}.result-time{font:42px/1.2 Georgia,serif;color:var(--gold)}.result-row{display:flex;justify-content:space-between;border-bottom:1px solid #526359;padding:8px 0;font-size:14px}.log-entry{padding:8px 0;border-bottom:1px solid #526359;font-size:14px;line-height:1.7}.log-entry b{display:block;font-weight:600;color:#d8bb83}.stamps{display:flex;gap:7px}.stamps span{flex:1;border:1px dashed #7b8571;padding:9px 5px;text-align:center;font-size:12px;color:#a4ada0}.stamps .inked{color:#e9c993;background:#485044}.large-item{width:120px;height:120px;display:block;margin:auto}#ending{color:#e8cc9d}
@media(min-width:1500px){.mast{min-height:95px}.pass{min-height:132px}.hero-copy{padding-left:72px}}
@media(max-width:900px){.pass-main{gap:18px;padding:16px 24px}.pass-heading{gap:8px}.pass-heading svg{width:24px}.pass-heading h2{font-size:21px}.pass-heading span{font-size:8px}.stub{min-width:123px;gap:9px}.barcode{width:23px}.stub b{font-size:17px}.route{gap:10px}.stop{column-gap:5px}.hero-copy{width:52%}.scenery{left:10%}}
@media(max-width:640px){#app{padding:0 12px}.mast,.playing .mast{min-height:58px}.brand{gap:6px}.sun-logo{width:32px}.brand b{font-size:18px}.brand span{font-size:6px}.head-tools{gap:6px}.head-tools button{padding:0 8px;min-height:34px;font-size:12px;gap:5px}.poster{margin-top:10px;height:auto;min-height:0;display:flex;flex-direction:column;padding-top:clamp(180px,41vw,265px)}.scenery{inset:0 0 auto;height:65%;background-position:65% 51%}.shade{background:linear-gradient(0deg,#142829 22%,#142829fa 33%,#142829ba 49%,#14282912 68%,transparent 78%)}.poster-frame{inset:6px}.poster-frame i{width:14px;height:14px}.hero-copy{width:100%;padding:7px 24px 25px;position:relative}.hero-copy img{width:205px;max-width:85%}.english{font-size:10px;margin-top:7px}.premise{font-size:13px;margin:13px 0 15px;line-height:1.8}.board{min-height:45px;min-width:183px;font-size:15px}.pass{margin-top:10px;min-height:78px}.pass-main{padding:11px 14px;display:block}.pass-heading{display:none}.stub{width:82px;min-width:72px;gap:4px;padding:6px}.stub b{font-size:13px}.stub small{font-size:9px}.barcode{width:12px;height:30px}.stop{display:flex;flex-wrap:wrap;flex-direction:column;gap:0}.stop span{border:0;width:auto;height:auto;font:10px Georgia}.stop b{font-size:14px}.stop small{font-size:7px;margin-top:1px}.route{gap:4px}.route i{min-width:6px;max-width:30px}.page-foot{padding:8px 0 10px;font-size:10.5px}.playing #app{padding:0 5px}#play{padding-top:5px}.viewport{height:calc(100svh - 140px)}.turn{width:34px;height:44px}#left{left:4px}#right{right:4px}#scene-clock{top:8px;right:8px;font-size:13px}.rail-hud{padding:5px;min-height:54px;margin-top:4px;gap:3px}.luggage{gap:3px}.luggage>span{font-size:0;gap:0}.luggage>span svg{width:15px}.slot{width:33px;height:36px}.slot .item-art{width:30px;height:30px}#items{gap:3px}.hud-tools{gap:4px}.hud-tools button{padding:0 6px;min-height:35px;font-size:11px;gap:4px}.hud-tools svg{width:13px}.dialog-card{padding:23px}.large-item{width:110px;height:110px}#feedback{font-size:12px;bottom:8px}.playing .brand span{font-size:6px}}
@media(max-height:540px) and (min-width:641px){.mast,.playing .mast{min-height:43px}.poster{min-height:425px}.viewport{min-height:170px;height:calc(100svh - 157px)}.rail-hud{min-height:42px;padding:2px 9px}.slot{height:33px;width:36px}.slot .item-art{width:30px;height:30px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
@media(max-width:640px) and (min-height:640px){
  .poster{min-height:clamp(475px,calc(100svh - 240px - var(--sgh-top,0px) - var(--ad-space,0px)),725px);justify-content:flex-end;padding-top:0}
  .hero-copy{height:auto;padding:0 25px 27px}
  .hero-copy img{width:clamp(202px,59vw,296px)}
  .scenery{height:66%;background-position:72% 44%}
  .shade{background:linear-gradient(0deg,#142829 27%,#142829fb 39%,#142829c7 52%,#14282938 66%,transparent 78%)}
  .premise{margin:16px 0 18px}
}
.slot[data-item=tokenA] .item-art,.slot[data-item=tokenB] .item-art,.slot[data-item=tablet] .item-art,.item-art:is([data-item=tokenA],[data-item=tokenB],[data-item=tablet]){background-image:url(../assets/tablets.webp);background-size:300% 100%}
.slot[data-item=tokenA],.item-art[data-item=tokenA]{--pos:0%}.slot[data-item=tokenB],.item-art[data-item=tokenB]{--pos:50%}.slot[data-item=tablet],.item-art[data-item=tablet]{--pos:100%}
.large-item.ticket-detail{
  width:min(250px,100%);height:auto;aspect-ratio:1.72;background-size:500% auto;
  display:flex;align-items:center;justify-content:center;gap:.28em;padding-top:16px;
  color:#402c1d;font:700 clamp(19px,4.6vw,23px)/1 var(--serif);
}
.stamps .inked canvas{display:block;width:100%;height:auto;margin-bottom:5px}
/* 広告（スマホだけ）のぶんは body の下に空ける。広告が無いときは 0px */
body{padding-bottom:var(--ad-space,0px)}
body.playing #app{display:flex;flex-direction:column;height:calc(100svh - var(--sgh-top,0px) - var(--ad-space,0px));height:calc(100dvh - var(--sgh-top,0px) - var(--ad-space,0px))}
/* 広告が出ているときは --ad-space がセーフエリアを含むので、二重に空けない */
html:not(.has-ad-banner) body.playing #app{padding-bottom:env(safe-area-inset-bottom,0px)}
/* 探索中は、ボタンを共通ヘッダーへ集めたあとの「社名だけの帯」を見た目だけ隠す（ボタンは共通ヘッダーが click する） */
.playing .mast{position:absolute;width:1px;height:1px;min-height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.playing .mast,.playing .rail-hud{flex:none}
.ending-view :is(.rail-hud,.turn,#scene-clock,#feedback){visibility:hidden}
.playing #play{display:flex;flex:1;min-height:0;flex-direction:column}
.playing #app #play .viewport{flex:1;min-height:130px;height:auto}
@supports(padding:max(0px,1px)){
  #app{padding-left:max(clamp(20px,3.65vw,72px),env(safe-area-inset-left));padding-right:max(clamp(20px,3.65vw,72px),env(safe-area-inset-right))}
  @media(max-width:640px){#app{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}.playing #app{padding-left:max(5px,env(safe-area-inset-left));padding-right:max(5px,env(safe-area-inset-right))}}
}

.sgr-panel,.sgr-cta{--c-panel:#1b302f;--c-text:#f1e9d8;--c-dim:#b5bdaf;--c-line:#75816f;--c-accent:#a48149;--c-accent-deep:#866535;--c-orange:#ecc788;--c-red:#f8ada0;--font-jp:var(--sans);--font-num:ui-monospace,monospace}
/* ===== 全国ランキング（共通モジュール sgr-*） ===== */
.sgr-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(6, 12, 18, 0.66);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.sgr-hidden { display: none !important; }

.sgr-panel {
  width: min(420px, 100%);
  max-height: min(80vh, 640px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--c-panel);
  color: var(--c-text);
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}

.sgr-title {
  margin: 0;
  font-size: 20px;
  text-align: center;
}

.sgr-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.sgr-tab {
  border: 1px solid var(--c-line);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: bold;
  font-family: var(--font-jp);
  background: rgba(226, 80, 42, 0.08);
  color: var(--c-text);
  cursor: pointer;
}

.sgr-tab-active {
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-deep));
  border-color: transparent;
  color: #fff;
}

.sgr-register-msg {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  color: var(--c-orange);
}

.sgr-form { display: flex; gap: 8px; }

.sgr-name {
  flex: 1;
  min-width: 0;
  font-size: 16px; /* iOSズーム防止のため16px以上 */
  font-family: var(--font-jp);
  padding: 8px 10px;
  border: 2px solid var(--c-line);
  border-radius: 8px;
  background: #fff;
  color: #192926;
  -webkit-user-select: text;
  user-select: text;
}

.sgr-name::placeholder { color: var(--c-dim); }

.sgr-name:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 8px rgba(226, 80, 42, 0.3);
}

.sgr-submit {
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: bold;
  font-family: var(--font-jp);
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-deep));
  color: #fff;
  cursor: pointer;
}

.sgr-submit:hover { filter: brightness(1.1); }

.sgr-submit:disabled { opacity: 0.5; cursor: default; }

.sgr-error {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--c-red);
}

.sgr-status {
  margin: 0;
  font-size: 13px;
  text-align: center;
  color: var(--c-dim);
}

.sgr-list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.sgr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.sgr-row:nth-child(even) { background: rgba(226, 80, 42, 0.07); }

.sgr-row.sgr-row-me {
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-deep));
  color: #fff;
}

.sgr-rank {
  width: 2em;
  text-align: right;
  font-weight: bold;
  flex-shrink: 0;
}

.sgr-row-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgr-row-score {
  font-weight: bold;
  font-family: var(--font-num);
  flex-shrink: 0;
}

.sgr-close {
  border: 1px solid var(--c-line);
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  font-weight: bold;
  font-family: var(--font-jp);
  background: rgba(226, 80, 42, 0.08);
  color: var(--c-text);
  cursor: pointer;
}

.sgr-close:hover { border-color: var(--c-accent); }

.sgr-cta {
  margin: 2px 0 12px;
  text-align: center;
}

.sgr-cta-msg {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: bold;
  color: var(--c-orange);
}

.sgr-cta-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: bold;
  font-family: var(--font-jp);
  background: linear-gradient(135deg, #f5a623, #f0741e);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(240, 116, 30, 0.4);
}

.sgr-cta-btn:hover { filter: brightness(1.08); }

.sgr-cta-link {
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: bold;
  font-family: var(--font-jp);
  background: rgba(30, 43, 56, 0.08);
  border: 1px solid var(--c-line);
  color: var(--c-text);
  cursor: pointer;
}

:root {
  --ad-h: 0px;
  --ad-space: 0px;
}
html.has-ad-banner {
  --ad-space: calc(var(--ad-h, 0px) + env(safe-area-inset-bottom, 0px));
}

.ad-banner {
  /* height は広告そのものの高さ。セーフエリアぶんの padding は外側に足す */
  box-sizing: content-box;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* ランキング・リザルト等の全画面オーバーレイ（2147483000）よりは下に置く */
  z-index: 2147482000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: var(--ad-h, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
  background: rgba(14, 16, 20, 0.86);
  /* border ではなく inset shadow にして、枠線ぶん高さがずれないようにする */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.ad-banner__frame {
  display: block;
  width: 100%;
  height: var(--ad-h, 0px);
  border: 0;
  color-scheme: light;
}

#back{top:auto;bottom:12px;left:12px;transform:none;width:48px;height:42px}
#back svg{transform:rotate(90deg)}
@media(max-width:640px){#back{left:7px;bottom:7px;width:44px;height:44px}}

/* 探索中は枠（左右の余白・ふち取り）を出さず、3D を画面の幅いっぱいに見せる（Ver. 1.0.1。人間の指示） */
body.playing #app{max-width:none;padding-left:0;padding-right:0}
.playing #play{padding:0}
.playing #app #play .viewport{border:0}
.playing .rail-hud{margin-top:0;border-width:1px 0 0;padding-left:max(12px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px))}
