:root{--ink:#e9efed;--muted:#b1bebd;--sage:#b4d2c5;--accent:#a7c9bd;--panel:rgba(18,27,36,.85);--line:rgba(225,240,235,.17)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#0e1823;color:var(--ink);font-family:"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;min-height:100vh}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:2px solid #e4d4a3;outline-offset:3px}.app{max-width:1460px;margin:auto;padding:22px 24px 34px}.mast{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:5px 6px 17px;font-size:11px;letter-spacing:.2em;color:#acbfbb}.mast strong{font-weight:400}.mast .rightmast{letter-spacing:.05em}.shell{position:relative;border-radius:24px;overflow:hidden;min-height:720px;display:grid;grid-template-columns:minmax(290px,43%) minmax(450px,57%);background:#1c2935;box-shadow:0 30px 85px #0007;border:1px solid #ffffff21}.visual{position:relative;min-height:660px;overflow:hidden;background:#23333e}.visual img{position:absolute;width:100%;height:100%;object-fit:cover;object-position:center 30%;transition:opacity .65s ease,transform 1.8s ease;animation:appear .7s ease}.visual:after{position:absolute;content:"";inset:0;background:linear-gradient(0deg,#091320dc 0%,transparent 43%,#06121b39 100%);pointer-events:none}.visual:before{position:absolute;content:"";z-index:1;inset:0;opacity:0;pointer-events:none;background:repeating-linear-gradient(133deg,transparent 0 20px,#dae8ee16 21px,transparent 22px 43px);transition:opacity .75s}.tone-uneasy .visual:before,.tone-shadow .visual:before{opacity:1}.tone-shadow .visual img{filter:saturate(.67) brightness(.62)}.tone-uneasy .visual img{filter:saturate(.72) brightness(.78)}.tone-warm .visual img{filter:saturate(1.05) brightness(1.05)}.visual-head{position:absolute;z-index:2;left:30px;top:28px;font-size:11px;color:#f4eaccb9;letter-spacing:.22em}.visual-foot{position:absolute;z-index:2;bottom:34px;left:34px;right:28px}.visual-foot .ey{letter-spacing:.22em;text-transform:uppercase;font-size:11px;color:#c6d1cb}.visual-foot .person{font:400 clamp(27px,3.1vw,43px)/1.4 "Yu Mincho","Hiragino Mincho ProN",serif;letter-spacing:.09em;margin:10px 0}.visual-foot .place{font-size:12px;color:#c0ceca;letter-spacing:.07em}.inner{padding:40px clamp(24px,4vw,65px);display:flex;flex-direction:column;gap:19px;background:linear-gradient(145deg,#233340 0%,#152630 100%);transition:background .7s;min-width:0}.tone-warm .inner{background:linear-gradient(135deg,#34403b,#243333)}.tone-uneasy .inner{background:linear-gradient(135deg,#253542,#19212c)}.tone-shadow .inner{background:linear-gradient(135deg,#131e2b,#111720)}.top{display:flex;justify-content:space-between;align-items:center;gap:14px;color:#b0c8bd;font-size:12px}.steps{display:flex;gap:6px;flex-wrap:nowrap}.step{height:5px;width:18px;border-radius:4px;background:#ffffff27}.step.active{background:#a6c5b3}.kicker{letter-spacing:.23em;font-size:12px;color:#a2c5b7;margin-top:16px}.maincopy{font:400 clamp(23px,2.9vw,36px)/1.85 "Yu Mincho","Hiragino Mincho ProN",serif;letter-spacing:.035em;white-space:pre-line;margin:4px 0 10px}.introcopy{font-size:14px;line-height:2.1;color:#b8c8c2}.instruction{font-size:13px;color:#c1d3cb;line-height:1.95}.instruction strong{font-weight:600;color:#e4ebdf}.choices{display:grid;gap:10px}.choice{border:1px solid #e0e9e137;padding:13px 17px 11px;border-radius:15px;background:#ffffff09;transition:opacity .15s,border-color .2s,background .2s}.choice .line{display:flex;align-items:center;gap:13px}.choice .no{font-family:Georgia,serif;font-size:18px;color:#9db6ab}.choice .sentence{font-size:16px;line-height:1.65;letter-spacing:.015em}.choice .read{margin-left:34px;margin-top:5px;font-size:11px;color:#a2b6b0;letter-spacing:.045em;line-height:1.7}.choice .mini-progress{height:3px;background:#ffffff19;margin:10px 0 0 34px;border-radius:3px;overflow:hidden}.choice .mini-progress b{height:100%;display:block;background:#d5d8ae;width:0;transition:width .15s}.choice.dim{opacity:.24}.choice.single{border-color:#bcd9bc;background:#a0c3ab1a;box-shadow:0 0 0 1px #bed8be28}.choice .phrase-done{color:#dfd7a5}.inputarea{border:1px solid #e2f5eb34;background:#f2f5ed0b;border-radius:17px;padding:15px}.inputlabel{display:block;font-size:12px;margin-bottom:9px;color:#a6c0b5}.typefield{width:100%;background:#fafbf6;color:#294239;border:1px solid #d4e4d8;border-radius:10px;padding:13px 14px;font-size:18px;min-height:54px}.typefield::placeholder{color:#8fa29a}.inputnote{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:11px;color:#b8c7c0;margin-top:9px;line-height:1.8}.error{font-size:12px;min-height:18px;color:#e8b8ae;margin-top:8px}.metrics{display:flex;gap:16px;flex-wrap:wrap;margin-top:auto}.metric{flex:1;min-width:90px;color:#acbeb5;font-size:11px}.meter{height:5px;background:#ffffff20;margin-top:9px;border-radius:5px;overflow:hidden}.meter span{display:block;height:100%;background:linear-gradient(90deg,#718d8b,#c0d9bd);transition:width .45s}.btnrow{display:flex;gap:10px;flex-wrap:wrap}.button{border:1px solid #a9c5b6;color:#172c2b;background:#b7d0bf;padding:12px 20px;border-radius:999px;font-size:13px;font-weight:700;transition:transform .2s,background .2s}.button:hover{transform:translateY(-2px);background:#d6e7d5}.button.alt{color:#cfddd5;background:transparent;border-color:#ffffff50}.button.alt:hover{background:#ffffff16}.pill{font-size:11px;letter-spacing:.18em;color:#bcd4c6}.replyletter{font:400 clamp(24px,2.5vw,31px)/1.95 "Yu Mincho",serif;white-space:pre-line;color:#eee6d2}.quoteBox{border-left:1px solid #b9c9af;padding-left:22px;margin:10px 0 16px}.resultImage{width:100%;max-height:470px;object-fit:cover;object-position:center 39%;border-radius:12px;box-shadow:0 14px 28px #0006;cursor:zoom-in}.resulttitle{font:400 31px/1.5 "Yu Mincho",serif;margin:0}.small{font-size:12px;color:#a6b9b1;line-height:1.8}.gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.tile{background:#ffffff0b;border:1px solid #ffffff27;border-radius:11px;overflow:hidden;text-align:left;color:inherit;padding:0}.tile img{width:100%;aspect-ratio:3/4;object-fit:cover;display:block}.tile.unseen img{filter:brightness(.16) saturate(.35) blur(4px)}.tile .tileinfo{padding:10px}.tile h3{font-size:12px;font-weight:500;margin:0 0 4px}.tile .small{font-size:10px}.footer{text-align:center;color:#a0b3aa;font-size:11px;line-height:2;padding:16px}.lightbox{position:fixed;inset:0;z-index:10;background:#060b0def;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:28px}.lightbox img{max-width:95vw;max-height:80vh;object-fit:contain}.lightbox .button{background:#b7d0bf}.counter{font:12px Georgia,serif;color:#b8c6bc}button:disabled{opacity:.45;cursor:not-allowed}@keyframes appear{from{opacity:.3}to{opacity:1}}@media(max-width:850px){.app{padding:8px 8px 24px}.shell{display:block;min-height:unset;border-radius:18px}.visual{height:260px;min-height:0}.visual img{object-position:center 27%}.visual-foot{left:20px;bottom:17px}.visual-foot .person{font-size:26px;margin:3px 0}.visual-head{top:17px;left:20px}.inner{padding:25px 20px 28px;gap:15px}.steps{gap:3px}.step{width:12px}.maincopy{font-size:26px}.kicker{margin-top:5px}.choice .sentence{font-size:14px}.choice{padding:11px 12px}.choice .read,.choice .mini-progress{margin-left:30px}.gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.resultImage{max-height:480px}.footer{font-size:10px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* v1.2 — learning scenes, typing modes and live stopwatch */
.topright{display:flex;gap:15px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.gameclock{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.03em;color:#e3e6d1;white-space:nowrap;font-size:13px}
.situation{border-left:2px solid #a2b9b080;padding:11px 15px;background:#ffffff0b;border-radius:0 12px 12px 0}
.situation-tag{display:block;font-size:11px;letter-spacing:.09em;color:#b3d2c7}
.situation p{font-size:12px;line-height:1.85;color:#d7dfda;margin:7px 0}
.situation-question{font-size:12px;line-height:1.75;color:#e1d8b6}
.modebox{border:1px solid #e0e9e12e;padding:11px 13px 8px;border-radius:13px;background:#ffffff08}
.modelabel{color:#d7e2db;font-size:12px;margin-bottom:9px}.modelabel small{color:#aabdb5;font-size:10px;margin-left:6px}
.modes{display:flex;gap:7px;flex-wrap:wrap}.mode{padding:9px 13px;background:#ffffff0b;border:1px solid #ffffff3b;border-radius:9px;color:#d5e0da;font-size:12px}
.mode.is-selected{background:#b4d1c3;color:#172c2b;border-color:#b4d1c3;font-weight:700}
.modehelp{margin:8px 0 2px;font-size:11px;color:#a9c0b5;line-height:1.6}
.lesson{border:1px solid #adbdad55;border-radius:15px;padding:13px 16px;background:#d6cbb20c}
.lesson summary{cursor:pointer;font-size:13px;color:#e2e4d0;font-weight:600;line-height:1.8}
.lesson summary span{font-size:10px;color:#b7cbbf;margin-left:8px;font-weight:400}
.lesson p{font-size:13px;line-height:2;color:#d5dfd8}.lesson small{display:block;color:#b1c3ba;line-height:1.75}
.performance{display:flex;justify-content:space-between;gap:16px;align-items:center;font-size:12px;color:#baccc1}
@media(max-width:850px){.topright{gap:8px}.gameclock{font-size:12px}.situation{padding:9px 11px}.mode{font-size:11px;padding:8px 10px}.modes{flex-direction:column}.lesson summary span{display:block;margin-left:0}}

/* v1.3 — streak, personal records, voice-ready ending media */
.typinghud{display:flex;gap:9px;flex-wrap:wrap;color:#dde4d9;font-size:12px}
.typinghud span{background:#ffffff10;border:1px solid #ffffff20;border-radius:12px;padding:9px 13px}
.typinghud b{color:#e8dcaa;font-variant-numeric:tabular-nums}
.enterhint{color:#e4d5a7;background:#ffffff0a;border:1px solid #b8c1a646;padding:11px 14px;border-radius:12px;font-size:13px}
.recordline{color:#d1d8bc;font-size:12px;line-height:1.8;border-left:2px solid #b7c8b5;padding:7px 12px}
.recordgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.recordgrid>div{background:#ffffff0c;border:1px solid #ffffff1c;border-radius:12px;padding:12px;color:#c0cfc8;font-size:11px}
.recordgrid strong{display:block;font-size:21px;font-weight:500;color:#f3e9cd;margin-top:7px}
.grade{display:flex;gap:15px;align-items:center;border:1px solid #e1d9b85c;border-radius:14px;padding:14px;background:#e7cf9610}
.gradeletter{font:42px Georgia,serif;color:#eed8a4;min-width:60px;text-align:center}
.grade b{color:#e9ebdb;font-weight:600}.grade p{font-size:11px;color:#b8c7be;line-height:1.7;margin:6px 0 0}
.resultVideo{width:100%;max-height:520px;object-fit:contain;border-radius:12px;background:#080f17}
@media(max-width:550px){.recordgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.typinghud{font-size:11px}}

/* v1.4 — fit a complete conversation in the desktop viewport */
@media(min-width:851px){
  .app{padding:10px 20px 12px;max-width:1530px}
  .mast{padding:3px 4px 9px}
  .shell{min-height:660px;height:calc(100dvh - 92px);grid-template-columns:minmax(270px,41%) minmax(510px,59%)}
  .visual{min-height:0;height:100%}
  .inner{padding:18px clamp(20px,2.8vw,45px);gap:9px;overflow-y:auto;scrollbar-width:thin}
  .inner:has(.scene-message){justify-content:space-between}
  .inner:has(.scene-message) .top{flex-shrink:0}
  .scene-message{font-size:clamp(20px,2.05vw,29px);line-height:1.5;margin:0}
  .scene-instruction{margin:0;font-size:12px;line-height:1.4}
  .situation{padding:7px 10px}
  .situation p{font-size:11px;line-height:1.5;margin:4px 0}
  .situation-question{font-size:11px;line-height:1.4}
  .choices{gap:6px}
  .choice{padding:7px 12px 6px;border-radius:11px}
  .choice .sentence{font-size:14px;line-height:1.35}
  .choice .read{margin-top:2px;font-size:10px;line-height:1.35}
  .choice .mini-progress{margin-top:4px}
  .inputarea{padding:10px 12px;border-radius:12px}
  .typefield{padding:9px 12px;font-size:16px;min-height:42px}
  .inputlabel{margin-bottom:5px}
  .inputnote{margin-top:4px;line-height:1.5}
  .error{min-height:0;margin-top:2px;font-size:11px}
  .compact-bottom .typinghud{gap:5px}
  .compact-bottom .typinghud span{padding:5px 9px;font-size:11px}
  .compact-bottom .metrics{margin-top:5px}
  .compact-bottom .meter{margin-top:4px}
  .compact-bottom .metric{font-size:10px}
  .kicker{margin-top:0}
  .footer{padding:5px;font-size:10px}
}
.scene-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.scene-row .kicker{margin:0}
.stop-btn{border:1px solid #b7c4c05e;background:#ffffff0a;color:#dae5dd;border-radius:999px;padding:7px 12px;font-size:11px;white-space:nowrap}
.stop-btn:hover{background:#ffffff25}
.stop-inline{margin-left:auto}
.enterhint{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.homehero{background:linear-gradient(110deg,#a7c8b417,transparent);border-left:2px solid #c5dfcc;padding:10px 16px 14px;border-radius:0 14px 14px 0}
.home-title{font:400 clamp(31px,3.4vw,48px)/1.5 'Yu Mincho',serif;margin:10px 0 12px}
.home-lead{font-size:14px;line-height:1.85;color:#dce7df;margin:0}
.homefeatures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.homefeatures>div{background:#ffffff0b;border:1px solid #ffffff20;border-radius:12px;padding:13px}
.homefeatures span{display:block;font-size:10px;color:#b9cba8;letter-spacing:.1em}
.homefeatures strong{display:block;font-size:13px;margin:9px 0;color:#f1eee1;line-height:1.5}
.homefeatures p{font-size:11px;line-height:1.7;color:#bfccc5;margin:0}
.primary-start{background:#ccdfc7;padding:15px 27px;font-size:15px}
@media(max-width:850px){.homefeatures{grid-template-columns:1fr}.home-title{font-size:31px}.scene-row{align-items:flex-start}.scene-message{line-height:1.55}}
@media(min-width:851px) and (max-height:780px){
 .shell{min-height:570px;height:calc(100dvh - 72px)}
 .inner{gap:5px;padding-top:10px;padding-bottom:10px}
 .situation p{margin:2px 0}.situation{padding:5px 9px}
 .choice{padding:5px 10px 4px}.choice .read{display:none}
 .maincopy.scene-message{font-size:21px}.homefeatures{gap:6px}
}

/* v1.5: show paused measurement clearly while INFJ explanations are read */
.gameclock.clock-paused{color:#d6e9d4}
.gameclock .clock-state{display:inline-block;margin-left:9px;padding:3px 7px;border:1px solid rgba(184,214,189,.36);border-radius:999px;letter-spacing:0;font-size:11px;font-family:inherit;color:#d2e8d4;background:rgba(133,173,147,.13);white-space:nowrap}
@media(max-width:420px){.gameclock .clock-state{font-size:10px;margin-left:4px;padding:2px 4px}}

/* v1.7 long-term relationship progression */
.bond-info{border:1px solid rgba(202,225,203,.3);border-radius:12px;padding:13px 15px;background:rgba(157,194,166,.10);color:#e7efdf}.bond-info strong{display:block;font-size:14px;letter-spacing:.05em}.bond-info p{font-size:12px;line-height:1.6;margin:7px 0}.bond-info span{font-size:11px;color:#c2d6ca}

/* v1.8 · The 70-scene illustrated journey */
.art-album{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.art-card{border:1px solid #ffffff2d;border-radius:12px;background:#ffffff0b;padding:0;color:#e4e9de;overflow:hidden;text-align:left;cursor:pointer}
.art-card img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;object-position:center 28%}
.art-card span{display:block;padding:10px 12px;min-height:70px}
.art-card small{display:block;color:#b5d2bc;letter-spacing:.12em;font-size:10px}
.art-card strong{display:block;font-size:12px;line-height:1.4;margin-top:5px;font-weight:500}
.art-card.locked img{filter:grayscale(1) brightness(.2) blur(3px)}
.album-nav{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:16px 0;color:#c9d5ca;font-size:12px}
@media(min-width:1150px){.art-album{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:420px){.art-album{gap:8px}.art-card span{padding:8px}.art-card strong{font-size:11px}}

/* v2.0 · Event videos, skip, replay, and browser-data guidance */
.story-video-modal{z-index:100;overscroll-behavior:contain}
.story-video-wrap{width:min(94vw,880px);max-height:94dvh;overflow:auto;background:#172a2b;border:1px solid #b8cfb776;padding:clamp(14px,3vw,25px);border-radius:18px;text-align:center}
.story-video-wrap h2{font-family:'Yu Mincho',serif;font-weight:400;font-size:clamp(19px,3vw,30px);margin:8px 0 15px;color:#f0e9d6}
.story-video-wrap video{display:block;max-width:100%;width:100%;max-height:62dvh;aspect-ratio:16/9;object-fit:contain;background:#060c0c;border-radius:10px}
.story-video-wrap .btnrow{justify-content:center;margin-top:15px}
.video-memory-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.video-memory-card{min-height:104px;text-align:left;padding:12px 14px;background:#e4efe008;border:1px solid #b9d2bc51;border-radius:13px;color:#ecf0e9;display:flex;flex-direction:column;gap:9px;cursor:pointer}
.video-memory-card:hover:not(:disabled){background:#d2edda18;border-color:#c8dfcb}
.video-memory-card strong{font-size:13px;line-height:1.4}
.video-memory-card small,.memory-kind{font-size:10px;color:#b9d5c6}
.video-memory-card.is-locked{opacity:.48;cursor:default}.video-memory-card.is-locked strong{letter-spacing:.12em}
.video-pref{border:1px solid #cee3d25e;background:#b0d7bf10;padding:13px 16px;border-radius:13px;font-size:12px}
.video-pref label{font-weight:700;display:flex;gap:9px;align-items:center;cursor:pointer}.video-pref input{accent-color:#b9d6bf;width:16px;height:16px}
.video-pref p{font-size:11px;color:#bdd0c5;line-height:1.7;margin:8px 0 0}
.storage-notice{border:1px solid #bbceb83e;border-radius:12px;padding:13px 15px;color:#c9d9cf;font-size:12px;line-height:1.8}
.storage-notice summary{cursor:pointer;color:#e4efdd;font-weight:600}
.storage-notice p{margin:9px 0 0}
@media(max-width:550px){.video-memory-grid{grid-template-columns:1fr}.story-video-wrap{max-height:96dvh}.story-video-wrap video{max-height:48dvh}}

/* v2.1: Romaji choice clarity */
.romaji-example{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;letter-spacing:.04em;opacity:.75;overflow-wrap:anywhere;margin-top:3px;}
.choice.single .romaji-example{color:#d4f2cf;opacity:1;}
.typefield{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.06em;}
.backup-tools{display:flex;flex-wrap:wrap;gap:9px;margin:14px 0;}
.backup-import{cursor:pointer;display:inline-flex;align-items:center;}
.choice.dim{opacity:.46;}
