:root{font-family:"Yu Gothic UI","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;color:#fff9ed;background:#174b58;font-synthesis:none;--ink:#173d44;--cream:#fff6e6;--line:rgba(255,249,237,.28);--glass:rgba(15,48,58,.76);--accent:#f2c293}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{color:inherit;cursor:pointer;border:1px solid var(--line);border-radius:9px;background:var(--glass);min-height:44px;padding:10px 15px;touch-action:manipulation}button:hover{background:#235b67}button:disabled{opacity:.5;cursor:wait}button:focus-visible,select:focus-visible,summary:focus-visible,input:focus-visible{outline:3px solid #ffcf8e;outline-offset:4px}button[aria-pressed=true]{background:var(--cream);color:var(--ink);border-color:var(--cream)}[hidden]{display:none!important}#viewer{position:relative;width:100%;height:100svh;min-height:620px;overflow:hidden;isolation:isolate}#sea{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}#sea:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(10,38,47,.6),transparent 70%),linear-gradient(0deg,rgba(10,34,44,.72),transparent 35%,transparent 78%,rgba(10,34,44,.28));z-index:1}.topbar,.welcome,.session-hud,.experience-controls,.bottom-bar{position:absolute;z-index:2}.topbar{top:max(20px,env(safe-area-inset-top));left:max(32px,env(safe-area-inset-left));right:max(32px,env(safe-area-inset-right));display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;align-items:center;gap:10px;font-size:23px;letter-spacing:4px;border:0;background:transparent;padding:0}.brand:hover{background:transparent}.brand span{font-size:13px;letter-spacing:0;opacity:.7}.brand svg{width:31px;fill:none;stroke:currentColor;stroke-width:2}.top-actions{display:flex;gap:7px}.top-actions button,.view-actions button{font-size:12px;background:rgba(16,48,59,.55)}.welcome{left:max(6vw,32px);bottom:100px;width:420px;max-width:calc(100% - 48px)}.eyebrow{font-size:10px;letter-spacing:3px;font-weight:600;margin:0 0 16px}h1{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-weight:500;letter-spacing:.09em;font-size:clamp(34px,4.5vw,66px);margin:0 0 18px}.intro{font-size:14px;line-height:2;letter-spacing:.06em;margin:0 0 25px}.mode-list{display:grid;gap:8px}.mode-list button{display:flex;align-items:center;gap:17px;text-align:left;padding:15px 19px;background:rgba(14,45,54,.79);border-color:rgba(250,239,216,.35);backdrop-filter:blur(12px)}.mode-list button:hover{background:rgba(40,83,91,.94);border-color:var(--cream)}.mode-number{font-family:Georgia,serif;color:var(--accent);font-size:16px}.mode-list strong{display:block;font-size:15px;font-weight:500;letter-spacing:.035em}.mode-list small{display:block;margin-top:6px;font-size:11px;color:#d5e3df}.mode-list button>span:last-child{margin-left:auto;font-size:22px;color:var(--accent)}.welcome-note{font-size:10px;line-height:1.8;color:#d3e0db;margin:14px 0 6px}.text-button{border:0;background:transparent;font-size:11px;padding:0;min-height:38px;color:#ffe0b7}.bottom-bar{bottom:max(16px,env(safe-area-inset-bottom));left:max(32px,env(safe-area-inset-left));right:max(32px,env(safe-area-inset-right));display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:10px;letter-spacing:.04em}.view-actions{display:flex;gap:6px}.session-hud{top:105px;left:max(32px,env(safe-area-inset-left));max-width:440px;pointer-events:none;text-shadow:0 1px 8px rgba(0,20,30,.6)}.session-meta{display:flex;gap:18px;font-size:10px;letter-spacing:.1em;margin-bottom:12px;color:#e0ebe5}.session-hud h1{font-size:31px;margin-bottom:8px}.session-hud p{font-size:12px;line-height:1.8;margin:0;max-width:340px}.sea-details{display:flex;gap:15px;font-size:10px;margin-top:14px;color:#d2e2df}#ride-stats{display:flex;gap:18px;margin-top:14px;font-size:10px}#ride-stats b{display:block;margin-top:4px;font-size:17px;font-weight:500}#last-ride{margin-top:12px;color:#ffe0b7}.experience-controls{right:max(32px,env(safe-area-inset-right));bottom:85px;display:flex;flex-direction:column;align-items:flex-end;gap:12px;width:360px;max-width:calc(100% - 32px)}.action-cluster{width:100%}.secondary-actions{display:flex;justify-content:flex-end;gap:7px;margin-bottom:8px;flex-wrap:wrap}.secondary-actions button{font-size:12px}.primary-action{display:flex;align-items:center;justify-content:space-between;width:100%;background:var(--cream);border-color:var(--cream);color:var(--ink);font-size:16px;font-weight:600;min-height:57px;box-shadow:0 3px 22px rgba(10,30,40,.14)}.primary-action:hover{background:#ffe1bb}.primary-action span{font-size:23px}#action-note{font-size:10px;text-align:right;color:#dce7e1;margin:9px 0 0;line-height:1.5}.ride-controls{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;width:100%}.ride-controls button{font-size:12px}.hand-left .experience-controls{left:max(32px,env(safe-area-inset-left));right:auto;align-items:flex-start}.hand-left .secondary-actions{justify-content:flex-start}.hand-left #action-note{text-align:left}.pause-notice{position:absolute;z-index:4;top:50%;left:50%;transform:translate(-50%,-50%);background:#153d47ed;border:1px solid var(--line);padding:24px;border-radius:12px;display:grid;gap:15px;text-align:center;min-width:220px}.pause-notice button{background:var(--cream);color:var(--ink)}#error,.no-script{position:absolute;inset:25% 10%;height:fit-content;z-index:10;background:#163e49;padding:28px;border:1px solid var(--line);border-radius:12px}#error h2{font-size:21px}#error p{font-size:14px;line-height:1.7}dialog{color:var(--ink);background:#f8f5ed;border:0;border-radius:18px;padding:28px;width:min(540px,calc(100% - 24px));max-height:calc(100dvh - 40px);box-shadow:0 25px 120px #001b2a66;overscroll-behavior:contain}dialog::backdrop{background:#082e3da6;backdrop-filter:blur(5px)}.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:10px}.dialog-header .eyebrow{font-size:8px;margin-bottom:8px;letter-spacing:2px;color:#557375}.dialog-header h2{font-family:"Yu Mincho",serif;font-weight:500;letter-spacing:.08em;font-size:27px;margin:0}.dialog-header button{font-size:23px;background:transparent;color:var(--ink);border-color:#b9ccc6;min-width:44px;padding:0}.dialog-intro,.field-note{font-size:11px;line-height:1.8;color:#557175}.dialog-intro{margin:17px 0 23px}fieldset{border:0;border-top:1px solid #cfd8d0;margin:0 0 23px;padding:18px 0 0}legend{font-size:13px;font-weight:700;padding:0 12px 0 0}legend span{font-weight:400;font-size:9px;color:#647c7a}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 14px;font-size:12px}select{min-height:44px;max-width:74%;padding:8px;border:1px solid #b9c9c2;border-radius:6px;background:#fffdf6;color:var(--ink);font-size:12px}.range-label{display:flex;justify-content:space-between;margin:17px 0 4px;font-size:12px}.range-label output{font-variant-numeric:tabular-nums}input[type=range]{width:100%;height:36px;margin:0;accent-color:#206b72;cursor:pointer}.check-label{display:flex;gap:10px;align-items:center;font-size:12px;min-height:44px}.check-label input{width:21px;height:21px;accent-color:#206b72}.presets{display:flex;gap:8px;margin:5px 0 18px}.presets button{flex:1;background:#e8ede5;color:var(--ink);border-color:#c6d3c9;font-size:12px}.save-settings{width:100%;background:#205965;color:#fff8e9;margin-top:22px}.save-settings:hover{background:#174552}details{font-size:12px;line-height:1.85;border-top:1px solid #cfd8d0;padding-top:12px}summary{cursor:pointer;min-height:44px;display:list-item;padding-top:10px}#save-note:empty{display:none}.fullscreen-fallback{position:fixed!important;inset:0;z-index:100;height:100dvh!important}#viewer:fullscreen{height:100dvh}.active .shade{background:linear-gradient(0deg,rgba(10,34,44,.7),transparent 38%,transparent 55%,rgba(10,34,44,.42))}
@media(max-width:760px){#viewer{min-height:600px}.topbar{left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top))}.brand{font-size:19px;gap:7px;letter-spacing:2px}.brand svg{width:26px}.brand span{display:none}.top-actions{gap:5px}.top-actions button{font-size:11px;padding:8px 11px}.welcome{left:24px;bottom:79px;width:calc(100% - 48px)}h1{font-size:40px}.welcome .eyebrow{font-size:8px;margin-bottom:12px}.intro{font-size:12px;line-height:1.85;margin-bottom:20px}.mode-list button{padding:13px 15px;min-height:69px}.mode-list strong{font-size:14px}.mode-list small{font-size:10px}.welcome-note{font-size:9px;margin-top:12px}.bottom-bar{left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));gap:6px}#state{font-size:9px;max-width:120px}.view-actions{gap:4px}.view-actions button{padding:7px 9px;font-size:10px}.session-hud{top:86px;left:22px;max-width:calc(100% - 44px)}.session-hud h1{font-size:27px}.session-hud p{font-size:11px;max-width:280px}.session-meta{margin-bottom:9px;font-size:9px}.sea-details{font-size:9px;gap:12px}.experience-controls,.hand-left .experience-controls{right:max(18px,env(safe-area-inset-right));left:auto;bottom:76px;width:300px}.hand-left .experience-controls{left:max(18px,env(safe-area-inset-left));right:auto}.secondary-actions button{font-size:11px;padding:9px 12px}.primary-action{font-size:15px}.ride-controls button{font-size:11px;min-height:44px;padding:8px}.ride-controls{gap:5px}dialog{padding:22px;max-height:calc(100dvh - 24px)}.setting-row{font-size:11px;gap:8px}select{font-size:11px}.active #state{max-width:65px}}
@media(max-height:700px) and (orientation:portrait){#viewer{min-height:560px}.welcome{bottom:62px}.welcome h1{font-size:34px;margin-bottom:12px}.welcome .intro{margin-bottom:14px}.mode-list{gap:6px}.mode-list button{padding:10px 13px;min-height:60px}.welcome-note{margin-top:9px}.eyebrow{margin-bottom:9px}.experience-controls{bottom:67px}.session-hud{top:78px}.session-hud h1{font-size:24px}}
@media(max-height:550px) and (orientation:landscape){#viewer{min-height:350px}.topbar{top:max(8px,env(safe-area-inset-top));left:max(22px,env(safe-area-inset-left));right:max(22px,env(safe-area-inset-right))}.welcome{left:max(24px,env(safe-area-inset-left));right:max(24px,env(safe-area-inset-right));top:76px;bottom:auto;width:auto;max-width:none;display:grid;grid-template-columns:1fr 1.25fr;column-gap:25px}.welcome .eyebrow{grid-column:1;margin-top:8px;font-size:8px}.welcome h1{grid-column:1;font-size:35px;margin-bottom:10px}.welcome .intro{grid-column:1;font-size:11px}.mode-list{grid-column:2;grid-row:1/5;gap:5px}.mode-list button{min-height:57px;padding:8px 13px}.mode-list strong{font-size:12px}.mode-list small{font-size:9px;margin-top:4px}.welcome-note{grid-column:1;font-size:8px;margin:0}.text-button{grid-column:2;min-height:30px;justify-self:start}.session-hud{top:72px;left:max(24px,env(safe-area-inset-left));max-width:300px}.session-hud h1{font-size:25px}.session-hud p{font-size:10px;max-width:250px}.sea-details{margin-top:8px;font-size:9px}.experience-controls,.hand-left .experience-controls{bottom:65px;width:280px;gap:7px}.ride-controls{grid-template-columns:repeat(3,1fr);gap:5px}.ride-controls button{font-size:10px;padding:5px}.primary-action{min-height:47px;font-size:13px}.secondary-actions button{min-height:44px;font-size:10px;padding:6px 10px}#action-note{display:none}.hand-left .session-hud{left:auto;right:max(24px,env(safe-area-inset-right));text-align:right}.hand-left .session-meta,.hand-left .sea-details,.hand-left #ride-stats{justify-content:flex-end}.bottom-bar{bottom:max(8px,env(safe-area-inset-bottom))}.session-meta{font-size:9px;margin-bottom:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important}}

/* Manual controls stay in reach while leaving the centre of the sea open. */
.primary-action .primary-copy { display:block; text-align:left; flex:1; min-width:0; }
.primary-copy strong { display:block; font-size:16px; }
.primary-copy small { display:block; font-size:11px; font-weight:400; line-height:1.5; margin-top:4px; }
.primary-action:disabled { opacity:1; cursor:default; color:#d1e1de; background:#224b55ed; border-color:#8dafaa88; box-shadow:none; }
.primary-action.takeoff-ready { color:#123f35; background:#c0f4b7; border-color:#edffe7; box-shadow:0 0 0 2px #c7ffc542,0 0 30px #94ffc475; }
.primary-action.takeoff-ready:hover { background:#dbffd0; }
.takeoff-ready #primary-label::before { content:'●'; font-size:11px; margin-right:8px; color:#2d774a; }
@media(max-height:550px) and (orientation:landscape) { .primary-copy strong { font-size:13px; } .primary-copy small { font-size:10px; margin-top:2px; } }
.shortcut-settings details { padding:0; }
.shortcut-settings summary { font-weight:600; padding:12px 0; }
.shortcut-row { display:grid; grid-template-columns:minmax(0,1fr) 82px 82px; gap:8px; align-items:center; margin:0 0 8px; }
.shortcut-row>span { font-size:11px; line-height:1.6; padding-right:4px; }
.shortcut-row button,#shortcut-reset { background:#e8ede5; color:var(--ink); border-color:#bdcfc7; font-size:11px; padding:8px 4px; min-height:40px; }
.shortcut-row button:hover,#shortcut-reset:hover { background:#d9e8df; }
.shortcut-row button[aria-pressed=true] { background:#205965; color:#fff8e9; outline:2px solid #d4a066; outline-offset:2px; }
#shortcut-note { position:sticky; bottom:0; z-index:1; margin:8px 0; padding:10px 0; min-height:40px; color:#245d62; background:#f8f5ed; border-top:1px solid #cfd8d0; }
#shortcut-reset { padding:9px 13px; }
.shortcut-actions { display:flex; flex-wrap:wrap; gap:8px; }
/* 設定項目だけをスクロールし、保存ボタンの領域を常に確保します。 */
#settings { --settings-padding:28px; padding:0; overflow:hidden; }
#settings[open] { display:flex; flex-direction:column; }
#settings-form { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:var(--settings-padding); scroll-padding-block:16px; }
.settings-actions { flex:none; padding:12px var(--settings-padding) max(12px,env(safe-area-inset-bottom)); border-top:1px solid #cfd8d0; background:#f8f5ed; }
.settings-actions .save-settings { margin:0; min-height:48px; }
.settings-actions #save-note { margin:8px 0 0; }
@media(max-width:760px) { #settings { --settings-padding:22px; } }
.top-actions button[aria-pressed=true],.view-actions button[aria-pressed=true] { background:var(--cream); color:var(--ink); }
@media(min-width:761px) and (pointer:fine) {
  [data-shortcut][data-key-hint]:not([data-key-hint=""])::after { content:attr(data-key-hint); display:inline-block; font-size:10px; font-weight:400; line-height:1.45; letter-spacing:0; white-space:nowrap; border:1px solid currentColor; border-radius:4px; padding:1px 5px; margin-left:8px; opacity:.75; }
  .sea-controls [data-shortcut]::after { margin:6px 0 0!important; }
  .ride-controls [data-shortcut]::after { display:table!important; margin:4px auto 0!important; }
  .mode-list [data-shortcut]::after { margin-left:0!important; }
  #welcome [data-shortcut]::after { display:none; }
}
@media(max-width:400px) { .shortcut-row { grid-template-columns:minmax(0,1fr) 68px 68px; gap:5px; } }
.experience-controls { width:390px; gap:10px; }
.sea-controls { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; width:100%; }
.sea-controls button { min-height:65px; padding:10px 6px; font-size:12px; touch-action:none; }
.sea-controls small { display:block; font-size:10px; margin-top:5px; opacity:.8; }
#sea-brake { min-height:65px; padding:6px; font-size:12px; }
#stroke { background:var(--accent); color:var(--ink); border-color:var(--accent); font-size:14px; font-weight:700; }
@media(max-width:760px) { .sea-controls small { display:none; } }
@media(max-height:550px) and (orientation:landscape) {
  .sea-controls button,#sea-brake { min-height:48px; padding:6px 4px; }
  .sea-controls small { display:none; }
}
#stroke:active { transform:translateY(2px); background:#ffe1bb; }
.ride-controls { grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-areas:"left up right" "crouch down neutral"; }
.ride-controls [data-input=left] { grid-area:left; }
.ride-controls [data-input=right] { grid-area:right; }
.ride-controls [data-input=up] { grid-area:up; }
.ride-controls [data-input=down] { grid-area:down; }
.ride-controls [data-input=crouch] { grid-area:crouch; }
.ride-controls #neutral { grid-area:neutral; }
.ride-guide { width:100%; background:#123f4ce8; border:1px solid #ffffff33; border-radius:9px; padding:12px; }
.ride-guide p { font-size:11px; line-height:1.7; margin:0 0 9px; color:#fbe5c8; }
.flow-stats { display:flex; justify-content:space-between; gap:12px; font-size:10px; }
#flow-meter { width:100%; height:9px; margin-top:5px; }
.weight-stats { display:flex; justify-content:space-between; gap:8px; font-size:11px; }
.weight-stats span { font-size:10px; color:#dfebe7; }
#weight-meter,#balance-risk { display:block; width:100%; height:9px; margin:5px 0 7px; }
#weight-meter { position:relative; }
#weight-meter::after { content:''; position:absolute; left:50%; top:0; bottom:0; width:2px; background:#fff8eb; }
.ride-guide #balance-status { font-size:10px; margin-bottom:2px; }
.ride-guide[data-danger=warning] #balance-status { color:#ffdc8c; }
.ride-guide[data-danger=high] { border-color:#ffa08c; }
.ride-guide[data-danger=high] #balance-status { color:#ffb49d; }
.ride-guide[data-danger=high] #balance-risk::-webkit-meter-optimum-value { background:#ef927c; }
.session-hud { width:310px; pointer-events:auto; scrollbar-width:thin; scrollbar-color:#c7dfd67a transparent; }
.hand-left .session-hud { left:auto; right:max(32px,env(safe-area-inset-right)); }
.coast-navigation { display:grid; grid-template-columns:110px 1fr; gap:6px 10px; margin-top:13px; padding:9px; border:1px solid #ffffff30; background:#113e48df; border-radius:8px; text-shadow:none; }
#coast-map { width:110px; align-self:center; }
#coast-map text { font-size:11px; fill:#f9eacc; }
#coast-map text:last-of-type { fill:#183e46; }
.coast-navigation strong,.coast-navigation span,.coast-navigation small { display:block; font-size:10px; line-height:1.7; }
.coast-navigation strong { font-size:13px; }
#sea-area[data-zone=offshore] { color:#bcf2cb; }
#sea-area[data-zone=break] { color:#ffd08c; }
#orientation-label { grid-column:1/-1; font-size:9px; }
.session-hud #getting-out-status { margin-top:7px; font-size:10px; color:#ffe1ae; }
.takeoff-debug { background:#10343feb; border:1px solid #ffffff3a; border-radius:8px; margin-top:12px; padding:0 10px 8px; text-shadow:none; }
.takeoff-debug summary { min-height:36px; padding-top:8px; font-size:11px; color:#fff0cf; }
.session-hud #debug-state { font-size:10px; color:#efd8b7; line-height:1.6; margin:3px 0 8px; }
#takeoff-checks { list-style:none; margin:0; padding:0; }
#takeoff-checks li { border-top:1px solid #ffffff17; padding:5px 0; line-height:1.5; }
#takeoff-checks strong,#takeoff-checks span { display:block; font-size:10px; }
#takeoff-checks strong { color:#ffc09f; font-weight:500; }
#takeoff-checks li[data-ok=true] strong { color:#b5efc0; }
#takeoff-checks span { color:#e0ebe8; }
.welcome .text-button { display:block; }
.brand .brand-wordmark { display:grid; gap:3px; text-align:left; font-size:inherit; letter-spacing:inherit; opacity:1; }
.records-panel { width:min(560px,calc(100vw - 32px)); max-height:85dvh; overflow:auto; }
.home-content { position:absolute; z-index:2; inset:132px max(6vw,24px) 80px; display:flex; align-items:safe flex-end; justify-content:space-between; gap:28px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#e7dfce85 transparent; }
.home-content .welcome { position:static; flex:0 1 420px; width:420px; max-width:100%; display:block; }
.feedback-panel { flex:0 1 380px; min-width:300px; padding:24px; border:1px solid #e8e5d5; border-radius:18px; color:var(--ink); background:#f8f5edf5; }
.feedback-panel .eyebrow { font-size:8px; color:#557175; margin-bottom:10px; letter-spacing:2px; }
.feedback-panel h2 { font-size:20px; font-weight:500; line-height:1.5; margin:0 0 10px; font-family:"Yu Mincho",serif; }
.feedback-intro { font-size:11px; line-height:1.8; color:#557175; margin:0 0 16px; }
.feedback-thanks { align-self:flex-end; max-width:380px; padding:18px; font-size:13px; line-height:1.7; background:#153d47db; border-radius:12px; }
@media(max-width:900px) {
  .home-content { flex-direction:column; align-items:stretch; justify-content:flex-start; inset:132px 24px 74px; gap:24px; }
  .home-content .welcome { width:100%; max-width:500px; flex:none; }
  .home-content .feedback-panel { width:100%; max-width:500px; min-width:0; flex:none; padding:22px; }
  .feedback-thanks { align-self:flex-start; }
}
@media(max-height:700px) and (min-width:901px) {
  .home-content { align-items:flex-start; inset-block:116px 72px; }
}
@media(max-height:550px) and (orientation:landscape) {
  .home-content { inset-block:120px 62px; }
}
#feedback-message,#feedback-login-note { font-size:13px; line-height:1.7; }
#feedback-message:empty { display:none; }
#feedback-fields { border:0; margin:20px 0 0; padding:0; }
.feedback-stars { display:flex; gap:7px; margin-top:10px; }
.feedback-star { position:relative; display:grid; place-items:center; width:46px; height:46px; border:1px solid #bacbc5; border-radius:9px; cursor:pointer; }
.feedback-star input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.feedback-star span { color:#7e918b; font-size:29px; line-height:1; }
.feedback-star.selected { background:#fff0cf; border-color:#bd8030; }
.feedback-star.selected span { color:#94600e; }
.feedback-star:has(input:focus-visible) { outline:3px solid #bd8030; outline-offset:3px; }
#feedback-rating-value { font-size:11px; margin:9px 0 22px; color:#557175; }
.feedback-comment-label { display:flex; justify-content:space-between; gap:10px; margin-bottom:9px; font-size:13px; font-weight:600; }
.feedback-comment-label span { font-size:10px; font-weight:400; color:#557175; }
#feedback-comment { display:block; width:100%; padding:12px; border:1px solid #b8c8c7; border-radius:9px; background:#fffdf8; color:var(--ink); font:inherit; font-size:16px; line-height:1.7; resize:vertical; }
#feedback-comment:focus-visible { outline:3px solid #bd8030; outline-offset:3px; }
.welcome-links { display:flex; align-items:center; flex-wrap:wrap; gap:6px 22px; margin-top:8px; }
#welcome .welcome-links .text-button { margin-top:0; }
.feedback-panel fieldset:disabled { opacity:.6; }
#feedback-login,#feedback-retry { background:#245762; color:#fffdf5; }
.entry-settings { width:min(500px,calc(100vw - 24px)); }
.entry-settings .dialog-header { margin-bottom:12px; }
.entry-settings .dialog-header .eyebrow { display:none; }
.entry-settings .dialog-header h2 { margin:0; }
.entry-settings .equipment-preview { height:135px; margin-bottom:12px; }
.entry-settings .dialog-intro { margin:0 0 10px; }
/* 入力は2列にまとめ、説明を開かなくても開始できる長さにします。 */
.entry-equipment-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 12px; }
.entry-equipment-grid .setting-row { display:flex; flex-direction:column; align-items:stretch; gap:5px; margin:0; min-width:0; font-size:12px; }
.entry-equipment-grid select { width:100%; max-width:100%; min-width:0; min-height:44px; padding:8px; }
.entry-stance-field { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:5px; min-width:0; }
.entry-stance-field small { text-align:right; color:#557175; font-size:10px; }
.entry-stance-field select { grid-column:1/-1; }
.entry-wave-settings { margin-top:14px; }
.entry-wave-settings .range-label { margin:0; }
.entry-wave-settings .presets { margin:0; }
.entry-wave-settings .presets button { min-height:44px; padding:8px 6px; }
.entry-wave-settings .presets button[aria-pressed=true] { color:#fff8e9; background:#205965; border-color:#205965; }
.entry-settings .entry-details { margin-top:8px; padding:0; border:0; }
.entry-details summary { display:list-item; padding:12px 0; min-height:44px; font-size:11px; color:#557175; }
.entry-details .field-note { margin:0 0 8px; }
.entry-settings .save-settings { margin-top:4px; min-height:44px; }
.entry-settings [data-settings-status] { margin:6px 0 0; }
@media(max-width:760px) {
  .entry-settings { padding:16px; border-radius:14px; }
  .entry-settings .dialog-header { margin-bottom:8px; }
  .entry-settings .dialog-header h2 { font-size:20px; }
  .entry-settings .dialog-intro { display:none; }
  .entry-settings .equipment-preview { height:110px; margin-bottom:10px; }
  .entry-equipment-grid { gap:8px 10px; }
  .entry-equipment-grid select { font-size:16px; }
}
@media(max-width:340px) {
  .entry-settings { width:calc(100vw - 16px); max-width:calc(100vw - 16px); padding:12px; }
  .entry-settings .equipment-preview { height:90px; }
  .entry-equipment-grid { column-gap:8px; }
  .entry-equipment-grid select { padding:8px 3px; }
}
[data-settings-status]:empty { display:none; }
/* 会員表示は共通ログインへの入口として、ホーム上部と海のメニューに置きます。 */
.topbar { display:grid; grid-template-columns:auto 1fr auto; }
.topbar .top-actions { justify-self:end; }
.account-controls,.account-user { display:flex; align-items:center; gap:10px; min-width:0; }
.account-controls { font-size:12px; }
.account-link { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 15px; border:1px solid var(--line); border-radius:9px; color:inherit; background:rgba(16,48,59,.55); text-decoration:none; white-space:nowrap; }
.account-link:hover { background:#235b67; }
.account-link:focus-visible { outline:3px solid #ffcf8e; outline-offset:4px; }
.account-user button { flex-shrink:0; font-size:12px; }
[data-account-name] { max-width:12em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.topbar [data-account-name] { max-width:clamp(5em,12vw,12em); }
.records-login-link { background:#245762; color:#fffdf5; width:100%; }
#records-local-login { margin-bottom:16px; }
#ocean-menu .account-controls { margin:18px 0; }
@media(max-width:900px) {
  .topbar { grid-template-columns:auto 1fr; }
  .topbar .account-controls { grid-column:1 / -1; justify-self:end; }
  .topbar [data-account-name] { max-width:calc(100vw - 180px); }
}
.records-intro, #records-message, #records-empty { font-size:13px; line-height:1.7; }
#records-message { min-height:1.7em; color:#315d65; }
#records-login { display:grid; gap:14px; padding:14px 0 22px; }
#records-login[hidden], .records-account[hidden] { display:none; }
#records-login label { display:grid; gap:6px; font-size:13px; }
#records-login input { width:100%; padding:12px; border:1px solid #b8c8c7; border-radius:8px; background:#fff; color:#173e46; font-size:16px; }
#records-login small { font-size:11px; line-height:1.6; }
.records-account { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:20px 0; }
.records-account strong { overflow-wrap:anywhere; font-size:14px; }
.records-board-switch { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; padding:5px; border-radius:12px; background:#dfe8e3; }
.records-board-switch button { min-width:0; padding:10px 4px; border:0; color:#315d65; background:transparent; font-size:13px; }
.records-board-switch button[aria-pressed="true"] { color:#fffdf5; background:#245762; box-shadow:0 2px 6px #173e4620; }
.records-board-switch button:focus-visible { outline:3px solid #bf6d34; outline-offset:2px; }
.records-board-summary { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px 12px; margin:20px 0 12px; }
.records-board-summary h3 { margin:0; font-size:14px; font-weight:600; }
.records-board-summary strong { color:#c9423d; font-size:15px; font-variant-numeric:tabular-nums; }
.records-list { padding:0; list-style:none; display:grid; gap:12px; }
.records-list>li { padding:15px; border:1px solid #cbd7d4; border-radius:12px; background:#ffffff65; }
.saved-ride-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.saved-ride-heading span { font-size:13px; }
.saved-ride-heading strong { color:#c9423d; font-size:22px; font-variant-numeric:tabular-nums; }
.records-list p, .records-list details { font-size:12px; line-height:1.8; }
.records-list summary { cursor:pointer; }
.records-list details { margin:8px 0 0; padding:0; border:0; }
.records-panel>button, #records-login>button, .records-account button { color:#fffdf5; background:#245762; }
.records-panel button:disabled { opacity:.55; }
.records-list details ul { padding-left:20px; margin-top:10px; }
.ride-save-status { margin:8px 0 0; font-size:10px; line-height:1.5; }
#welcome [data-records-open] { margin-top:8px; }
@media(max-width:420px) { #records-title { font-size:21px; letter-spacing:1px; } }
.brand-wordmark strong { font-size:22px; font-weight:500; line-height:1.1; letter-spacing:3px; }
.brand-wordmark small { font-size:10px; line-height:1.15; letter-spacing:2px; opacity:.8; }
.brand .brand-version { margin-left:8px; font-size:10px; letter-spacing:0; white-space:nowrap; opacity:1; }
@media(max-width:760px) {
  .brand-wordmark strong { font-size:17px; letter-spacing:1.5px; }
}
@media(max-width:420px) {
  .topbar { gap:8px; }
  .brand { gap:6px; }
  .brand svg { width:22px; }
  .brand-wordmark strong { font-size:15px; letter-spacing:1px; }
  .top-actions { gap:4px; }
  .top-actions button { padding:8px; font-size:10px; }
}
@media(max-width:760px) {
  .active:not(.is-riding) .session-hud { max-height:calc(100dvh - 420px); overflow-y:auto; overscroll-behavior:contain; padding-right:5px; width:calc(100% - 44px); }
  .hand-left .session-hud { right:22px; }
  .active:not(.is-riding) .session-hud #message { display:none; }
  .coast-navigation { grid-template-columns:90px 1fr; padding:6px; gap:3px 8px; margin-top:8px; }
  #coast-map { width:90px; }
  .is-riding .coast-navigation { grid-template-columns:66px 1fr; width:255px; }
  .is-riding #coast-map { width:66px; }
  .is-riding #orientation-label,.is-riding #depth-label { display:none; }
  .takeoff-debug { margin-top:8px; }
  #takeoff-checks li { padding:3px 0; line-height:1.4; }
  .welcome .text-button { min-height:29px; }
}
@media(max-height:550px) and (orientation:landscape) {
  .active:not(.is-riding) .session-hud { max-height:calc(100dvh - 130px); overflow-y:auto; overscroll-behavior:contain; padding-right:5px; width:300px; }
  #takeoff-checks li { padding:3px 0; line-height:1.4; }
  .welcome #getting-out { grid-column:1; grid-row:5; }
  .coast-navigation { margin-top:6px; }
  .is-riding .coast-navigation { display:none; }
}
.ride-controls button { touch-action:none; user-select:none; -webkit-user-select:none; padding:9px 5px; }
.paddle-stats { display:grid; grid-template-columns:auto auto 1fr; gap:8px 16px; margin-top:16px; font-size:12px; font-variant-numeric:tabular-nums; max-width:350px; }
.paddle-stats meter { grid-column:1/-1; width:100%; height:10px; }
.ride-line { display:flex; align-items:center; gap:9px; margin-top:12px; font-size:10px; }
.ride-line meter { width:140px; height:12px; }
meter::-webkit-meter-bar { border:0; background:#153d47aa; }
meter::-webkit-meter-optimum-value { background:#f2c293; }
.session-hud .trick-feedback { margin-top:12px; color:#ffe0a8; font-size:17px; font-weight:600; }
.trick-feedback:empty { display:none; }
.is-riding .secondary-actions { margin-bottom:0; }
.is-riding #action-note { font-size:11px; }
@media(max-width:760px) {
  .experience-controls,.hand-left .experience-controls { width:calc(100% - 36px); gap:8px; }
  .sea-controls button { min-height:64px; }
  .session-hud .trick-feedback { font-size:14px; }
  .is-riding #message,.is-riding .sea-details { display:none; }
  .is-riding #action-note { font-size:9px; margin-top:5px; }
  .paddle-stats { gap:7px 12px; font-size:11px; }
}
@media(max-height:550px) and (orientation:landscape) {
  .experience-controls,.hand-left .experience-controls { width:330px; bottom:60px; gap:5px; }
  .sea-controls button { min-height:55px; }
  .sea-controls small { display:none; }
  .active:not(.is-riding) #action-note { display:block; font-size:9px; margin-top:5px; }
  .ride-controls button { min-height:36px; }
  .ride-guide { padding:7px 10px; }
  .ride-guide p { font-size:9px; margin-bottom:5px; }
  .is-riding .secondary-actions button { min-height:36px; padding:5px 10px; }
  .is-riding .session-hud { max-width:270px; }
  .is-riding #message { display:none; }
}
/* The sea is the primary control surface; supporting UI opens only when requested. */
.equipment-preview { display:block; width:100%; height:225px; border-radius:12px; background:#e9eee7; margin-bottom:18px; }
.board-spec { margin:0 0 5px; font-size:12px; font-weight:600; color:#285b62; }
.equipment-settings #board-description { margin:0 0 20px; }
.skill-guide { margin:14px 0; scroll-margin-top:78px; }
.skill-guide h3 { margin:20px 0 8px; font-size:14px; color:#ffe0ad; }
.skill-entry { border-top:1px solid #ffffff26; padding:10px 0; }
.skill-entry strong { font-size:12px; }
.skill-entry small { display:block; font-size:10px; color:#bde0d2; margin:3px 0; }
#info-panel .skill-entry p { font-size:11px; line-height:1.8; }
#info-panel .equipment-label { font-size:11px; color:#e2cfad; margin-bottom:12px; }
#viewer.active { height:100dvh; min-height:320px; }
.active .topbar,.active .bottom-bar { display:none; }
.active .shade { background:linear-gradient(180deg,#092c3b4d,transparent 22%,transparent 75%,#092c3b66); }
.ocean-tools { position:absolute; z-index:3; top:max(16px,env(safe-area-inset-top)); right:max(22px,env(safe-area-inset-right)); display:flex; gap:8px; }
.ocean-tools button { min-width:44px; min-height:44px; padding:10px 13px; border-color:#fff6e638; background:#143c4966; backdrop-filter:blur(8px); font-size:12px; border-radius:24px; }
.ocean-tools button[aria-pressed=true] { color:#183f45; background:#f7efdb; border-color:#f7efdb; }
.ocean-tools span { margin-right:4px; }
.ocean-tools button { white-space:nowrap; }
/* Development diagnostics only appear on a desktop pointer and stay outside the central view. */
.ride-debug { display:none; }
@media(min-width:761px) and (hover:hover) and (pointer:fine) {
  .ride-debug { display:block; position:absolute; top:76px; right:max(22px,env(safe-area-inset-right)); z-index:3; width:282px; max-height:calc(100dvh - 112px); overflow:auto; padding:11px 13px; border:1px solid #b5d1ce66; border-radius:10px; background:#092b36e8; color:#e0efeb; font-size:11px; line-height:1.55; overscroll-behavior:contain; }
  .ride-debug-title { color:#bdd7d5; font-size:10px; letter-spacing:.06em; }
  .ride-debug p { margin:4px 0; }
  #ride-debug-state { color:#f5efd9; }
  #ride-debug-live { font-variant-numeric:tabular-nums; font-size:10px; }
  #ride-debug-empty { color:#acc6c3; margin-top:7px; font-size:10px; }
  #ride-debug-end { border-top:1px solid #bed8d12e; margin-top:8px; padding-top:7px; }
  .ride-debug-caption { display:block; color:#a8c4c0; font-size:10px; }
  #ride-debug-reason { display:block; color:#ffb69f; margin-top:2px; font-size:12px; }
  .ride-debug[data-outcome=complete] #ride-debug-reason { color:#c6e6b3; }
  #ride-debug-trigger { font-size:10px; overflow-wrap:anywhere; }
  .ride-debug details { font-size:10px; margin-top:7px; padding:3px 0 0; border-color:#bed8d12e; }
  .ride-debug summary { min-height:28px; padding-top:3px; }
  #ride-debug-values { margin:6px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; font:10px/1.7 ui-monospace,monospace; color:#cfdfdb; user-select:text; }
  .active:not(.immersive) .ride-debug { max-height:174px; }
}
@media(min-width:761px) and (hover:hover) and (pointer:fine) and (max-height:550px) {
  .active:not(.immersive) .ride-debug { right:380px; width:260px; max-height:calc(100dvh - 100px); }
}
.minimal-hud { position:absolute; z-index:2; top:max(19px,env(safe-area-inset-top)); left:max(26px,env(safe-area-inset-left)); pointer-events:none; text-shadow:0 1px 9px #073243a6; display:grid; gap:5px; }
.ocean-mark { font-size:10px; letter-spacing:2px; opacity:.8; margin-bottom:15px; }
#ocean-phase { font-size:17px; font-weight:500; letter-spacing:.08em; }
#ocean-position { font-size:10px; color:#e0ece8; }
.ocean-map { width:144px; margin:5px 0 0; border:1px solid #fff6e638; border-radius:7px; overflow:hidden; background:#153e4bb3; text-shadow:none; }
.ocean-map svg { display:block; width:100%; }
.ocean-map text { font-size:12px; fill:#f9eacc; }
.ocean-map text:last-of-type { fill:#183e46; }
.ocean-map figcaption { padding:4px 6px; font-size:9px; color:#f4f1e8; letter-spacing:.03em; }
.ocean-map figcaption span { color:#ffcc8b; }
.pov-zoom { width:206px; max-width:100%; margin-top:5px; padding:8px; border:1px solid #fff6e638; border-radius:9px; background:#103542cc; pointer-events:auto; text-shadow:none; }
.pov-zoom-label { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:5px; font-size:10px; color:#d5e5de; }
#pov-fov { font-variant-numeric:tabular-nums; color:#ffda9d; }
.pov-zoom-buttons { display:grid; grid-template-columns:1fr .8fr 1fr; gap:4px; }
.pov-zoom button { min-width:0; min-height:44px; padding:6px 3px; font-size:11px; border-radius:6px; background:#174651; }
.pov-zoom button:disabled { cursor:default; }
.away-controls { position:absolute; z-index:3; left:50%; bottom:max(14px,calc(env(safe-area-inset-bottom) + 10px)); transform:translateX(-50%); display:grid; grid-template-columns:120px 68px; align-items:center; justify-content:center; gap:7px 15px; width:240px; padding:9px 12px; border:1px solid #fff6e642; border-radius:20px; background:#103542c9; color:#fff3dc; user-select:none; }
#away-stick-hint { grid-column:1/-1; margin:0; text-align:center; font-size:10px; line-height:1.5; white-space:nowrap; }
.surf-stick { position:relative; width:120px; height:120px; border:1px solid #badcd066; border-radius:50%; background:radial-gradient(circle,#427b8177 0 28%,#123c4955 29%); touch-action:none; cursor:grab; outline-offset:3px; }
.surf-stick:focus-visible { outline:2px solid #ffcf8e; }
.surf-stick.is-held { cursor:grabbing; border-color:#ffcf8e; }
.surf-stick[aria-disabled=true] { opacity:.4; cursor:default; }
.surf-stick>span { position:absolute; pointer-events:none; }
.stick-up { top:3px; left:50%; transform:translateX(-50%); }
.stick-down { bottom:3px; left:50%; transform:translateX(-50%); }
.stick-left { left:5px; top:50%; transform:translateY(-50%); }
.stick-right { right:5px; top:50%; transform:translateY(-50%); }
.surf-stick-knob { left:50%; top:50%; width:42px; height:42px; transform:translate(-50%,-50%); border:1px solid #fff4d9b3; border-radius:50%; background:#e7d1a6e8; box-shadow:0 3px 12px #09263360; }
#away-action { width:68px; min-height:68px; padding:8px 4px; border-radius:50%; font-size:13px; touch-action:manipulation; }
#away-action:disabled { cursor:default; }
#away-action.takeoff-ready { color:#123f35; background:#c0f4b7; border-color:#edffe7; box-shadow:0 0 18px #94ffc455; }
#viewer.has-joystick .experience-controls,#viewer.has-joystick .gesture-hint { display:none; }
#viewer.has-joystick .ocean-feedback { top:auto; bottom:max(190px,calc(env(safe-area-inset-bottom) + 186px)); }
#viewer.has-joystick.has-maneuver .ocean-feedback { bottom:max(278px,calc(env(safe-area-inset-bottom) + 274px)); }
#viewer.has-joystick .maneuver-feedback { bottom:max(190px,calc(env(safe-area-inset-bottom) + 186px)); }
@media(max-height:550px) and (orientation:landscape) {
  .away-controls { grid-template-columns:92px 60px; width:210px; padding:6px 10px; gap:3px 12px; bottom:max(8px,env(safe-area-inset-bottom)); }
  .surf-stick { width:92px; height:92px; }
  .surf-stick-knob { width:32px; height:32px; }
  #away-action { width:60px; min-height:60px; }
  #away-stick-hint { font-size:9px; }
  #viewer.has-joystick .maneuver-feedback,#viewer.has-joystick .ocean-feedback { bottom:max(140px,calc(env(safe-area-inset-bottom) + 134px)); }
  #viewer.has-joystick.has-maneuver .ocean-feedback { bottom:max(216px,calc(env(safe-area-inset-bottom) + 210px)); }
  #viewer.has-joystick .ride-result { top:27%; }
}
@media(min-width:761px) and (max-height:550px) {
  #viewer.has-joystick .ride-debug { right:max(22px,env(safe-area-inset-right)); width:260px; max-height:calc(100dvh - 220px); }
}
.minimal-hud:has(.pov-zoom:not([hidden])) { max-width:calc(100% - 180px); }
.active:not(.immersive):has(.pov-zoom:not([hidden])) .ocean-feedback { top:320px; }
@media(max-height:550px) and (orientation:landscape) {
  .pov-zoom { grid-column:1/-1; grid-row:4; width:206px; }
  .active:not(.immersive):has(.pov-zoom:not([hidden])) .ocean-feedback { top:220px; }
}
.ocean-feedback { position:absolute; z-index:2; left:50%; transform:translateX(-50%); bottom:max(68px,calc(env(safe-area-inset-bottom) + 55px)); max-width:calc(100% - 44px); width:max-content; margin:0; padding:8px 14px; border-radius:20px; color:#fff0cf; background:#103842ad; font-size:12px; text-align:center; pointer-events:none; }
.gesture-hint { position:absolute; z-index:2; bottom:max(20px,calc(env(safe-area-inset-bottom) + 12px)); left:50%; transform:translateX(-50%); max-width:calc(100% - 36px); width:max-content; padding:8px 13px; border-radius:18px; margin:0; color:#f0f4e9; background:#10384288; text-shadow:0 1px 5px #07323e; font-size:11px; line-height:1.7; text-align:center; pointer-events:none; }
.maneuver-feedback { position:absolute; z-index:3; left:50%; bottom:max(90px,calc(env(safe-area-inset-bottom) + 78px)); transform:translateX(-50%); width:360px; max-width:calc(100% - 32px); display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:4px 16px; padding:12px 18px; border:1px solid #f4cd8d99; border-radius:14px; background:#103842ed; box-shadow:0 8px 28px #082f3c40; color:#fff4da; pointer-events:none; line-height:1.4; }
#maneuver-name { font-size:16px; overflow-wrap:anywhere; }
#maneuver-points { font-size:32px; font-variant-numeric:tabular-nums; color:#ff7474; white-space:nowrap; }
#maneuver-combo { font-size:11px; color:#ffda91; letter-spacing:.06em; }
#maneuver-total { font-size:12px; text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.immersive.has-maneuver .ocean-feedback { bottom:max(214px,calc(env(safe-area-inset-bottom) + 202px)); }
.gesture-cursor { position:absolute; z-index:2; width:88px; height:88px; margin:-44px 0 0 -44px; border:1px solid #fff5df70; border-radius:50%; pointer-events:none; background:#efffee08; }
.gesture-cursor i { position:absolute; width:12px; height:12px; border-radius:50%; background:#fff6e6d9; top:37px; left:37px; box-shadow:0 1px 8px #07323e80; }
.gesture-cursor span { display:block; position:absolute; top:96px; width:160px; left:-36px; font-size:10px; text-align:center; color:#fff7e6; text-shadow:0 1px 7px #10323f; }
.immersive #sea-controls,.immersive #ride-controls,.immersive #ride-guide,.immersive .secondary-actions,.immersive #action-note { display:none; }
#viewer.immersive #action-note { display:none; }
#viewer.immersive .experience-controls { left:50%; right:auto; transform:translateX(-50%); bottom:max(114px,calc(env(safe-area-inset-bottom) + 104px)); width:260px; max-width:calc(100% - 40px); }
.immersive #primary:not(.takeoff-ready) { display:none; }
.immersive #primary { min-height:53px; border-radius:30px; padding:10px 22px; text-align:center; box-shadow:0 3px 24px #083f3633; background:#e4f5dfe8; border:1px solid #efffe8; }
.immersive #primary .primary-copy { text-align:center; }
.immersive #primary .primary-copy strong { font-size:14px; letter-spacing:.05em; }
.immersive #primary .primary-copy small { font-size:10px; }
.immersive #primary::after { display:none; }
.active:not(.immersive) .experience-controls { bottom:max(26px,calc(env(safe-area-inset-bottom) + 20px)); }
.active:not(.immersive) .ocean-feedback { top:220px; bottom:auto; left:max(26px,env(safe-area-inset-left)); transform:none; max-width:300px; }
.menu-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.menu-grid button { color:var(--ink); background:#e8ede5; border-color:#c5d1c9; min-height:48px; font-size:12px; text-align:left; padding:12px; }
.menu-grid button:hover { background:#d9e8df; }
#menu-resume { margin-bottom:0; }
#info-panel { background:#123d49; color:#fff5e6; }
#info-panel .dialog-header { position:sticky; top:-28px; z-index:3; background:#123d49; padding:8px 0 16px; }
#info-panel .dialog-header button { background:#fff5e6; }
#info-panel #session-hud { position:static; display:block; width:100%; max-width:none; max-height:none; height:auto; padding:0; overflow:visible; text-align:left; text-shadow:none; }
#info-panel .session-meta,#info-panel .sea-details,#info-panel #ride-stats { justify-content:flex-start; }
#info-panel .session-hud p { max-width:none; }
#info-panel #message,#info-panel #orientation-label,#info-panel #depth-label { display:block; }
#info-panel .coast-navigation { display:grid; width:100%; grid-template-columns:110px 1fr; }
#info-panel #coast-map { width:110px; }
#info-panel #phase-title { font-size:23px; }
#info-panel .session-meta { margin-top:10px; }
#info-panel #takeoff-debug { margin-bottom:4px; }
@media(max-width:760px) {
  .ocean-tools { top:max(12px,env(safe-area-inset-top)); right:max(14px,env(safe-area-inset-right)); display:grid; grid-template-columns:auto auto; gap:6px; }
  .looking .ocean-tools { grid-template-columns:repeat(3,auto); }
  .ocean-tools button { padding:10px 12px; font-size:11px; }
  .minimal-hud { top:max(18px,env(safe-area-inset-top)); left:max(20px,env(safe-area-inset-left)); }
  .ocean-mark { font-size:9px; letter-spacing:1.5px; margin-bottom:16px; }
  #ocean-phase { font-size:15px; }
  #ocean-position { font-size:9px; }
  .ocean-map { width:126px; }
  .gesture-hint { font-size:10px; }
  .ocean-feedback { font-size:11px; }
  #info-panel .dialog-header { top:-22px; }
  #viewer.immersive .experience-controls { width:250px; }
  .active:not(.immersive) .ocean-feedback { top:235px; max-width:calc(100% - 40px); }
}
@media(max-width:380px) {
  .minimal-hud { max-width:calc(100% - 178px); }
  #ocean-phase { font-size:13px; line-height:1.6; }
  #ocean-position { line-height:1.6; }
  .ocean-map { max-width:100%; }
}
@media(max-width:600px) {
  .looking .ocean-tools button { padding:10px 8px; }
  .looking .minimal-hud { top:max(70px,calc(env(safe-area-inset-top) + 58px)); }
}
@media(max-height:550px) and (orientation:landscape) {
  .equipment-preview { height:190px; }
  .ocean-tools { top:max(10px,env(safe-area-inset-top)); right:max(22px,env(safe-area-inset-right)); }
  .minimal-hud { top:max(16px,env(safe-area-inset-top)); left:max(24px,env(safe-area-inset-left)); grid-template-columns:110px auto; gap:3px 12px; }
  .ocean-map { grid-column:1; grid-row:1/4; width:110px; margin:0; }
  .ocean-map figcaption { display:none; }
  .ocean-mark,#ocean-phase,#ocean-position { grid-column:2; }
  .ocean-mark { margin-bottom:0; }
  #ocean-phase { font-size:14px; }
  .gesture-hint { bottom:max(12px,env(safe-area-inset-bottom)); font-size:10px; }
  .ocean-feedback { bottom:max(55px,calc(env(safe-area-inset-bottom) + 45px)); padding:6px 12px; font-size:10px; }
  #viewer.immersive .experience-controls { bottom:95px; width:240px; }
  .active:not(.immersive) .experience-controls { width:330px; bottom:18px; }
  .active:not(.immersive) .ocean-feedback { top:108px; bottom:auto; max-width:260px; }
  .active:not(.immersive).hand-left .ocean-feedback { left:auto; right:max(24px,env(safe-area-inset-right)); }
}

/* A compact, non-interactive result leaves the ocean and its controls running. */
.ride-result { position:absolute; z-index:3; top:50%; left:50%; transform:translate(-50%,-50%); width:min(276px,calc(100% - 36px)); padding:14px 18px; border-radius:14px; color:#fff4da; background:#123d49d9; border:1px solid #f4cd8d60; box-shadow:0 8px 28px #082f3c30; text-align:center; pointer-events:none; }
#ride-result-title { margin:0 0 8px; font-size:13px; font-weight:500; letter-spacing:.1em; }
.ride-result-score { display:flex; align-items:center; justify-content:center; gap:14px; }
.ride-result-score>span { font-size:11px; letter-spacing:.08em; color:#dfd0ad; }
.ride-result-score strong { display:flex; align-items:baseline; justify-content:center; gap:5px; color:#ff7474; font-variant-numeric:tabular-nums; }
.ride-result-score b { font-size:36px; font-weight:700; line-height:1.15; }
.ride-result-score small { font-size:12px; }
.ride-result-maneuvers { margin-top:10px; border-top:1px solid #fff4da24; padding-top:9px; }
.ride-result-maneuvers h3 { display:inline; margin:0; font-size:11px; font-weight:500; }
#ride-result-count { display:inline; color:#cbddd7; font-size:10px; margin:0 0 0 8px; }
#ride-result-count:empty { display:none; }
#ride-result-skills { display:flex; flex-wrap:wrap; justify-content:center; gap:4px 10px; list-style:none; padding:0; margin:7px 0 0; }
#ride-result-skills:empty { display:none; }
#ride-result-skills li { display:flex; align-items:baseline; gap:5px; font-size:11px; line-height:1.6; }
#ride-result-skills li span { overflow-wrap:anywhere; min-width:0; }
#ride-result-skills li b { flex-shrink:0; color:#dfd0ad; font-size:10px; font-weight:400; font-variant-numeric:tabular-nums; }
#ride-result-empty { margin:6px 0 0; color:#d3e5df; font-size:11px; line-height:1.6; }
.ride-result:not([hidden]) { animation:ride-result-in .35s ease-out both; }
.ride-result:not([hidden]) .ride-result-score strong { animation:ride-score-pop .75s ease-out both; }
@keyframes ride-result-in { from { opacity:0; transform:translate(-50%,calc(-50% + 8px)); } to { opacity:1; transform:translate(-50%,-50%); } }
@keyframes ride-score-pop { 0% { transform:scale(.8); } 45% { transform:scale(1.14); text-shadow:0 0 18px #ff747480; } 100% { transform:scale(1); text-shadow:none; } }
@media(max-height:550px) and (orientation:landscape) {
  .ride-result { width:min(276px,calc(100% - 36px)); padding:10px 14px; }
  #ride-result-title { margin-bottom:5px; font-size:12px; }
  .ride-result-score b { font-size:30px; }
  .ride-result-maneuvers { margin-top:7px; padding-top:6px; }
}
@media(prefers-reduced-motion:reduce) { .ride-result,.ride-result .ride-result-score strong { animation:none!important; } }
/* Reserve a stable bottom row so score notices never cover the control buttons. */
#viewer.active:not(.immersive) .experience-controls { bottom:max(90px,calc(env(safe-area-inset-bottom) + 82px)); }
.active:not(.immersive) .maneuver-feedback { bottom:max(8px,env(safe-area-inset-bottom)); padding:7px 14px; gap:2px 12px; }
.active:not(.immersive) #maneuver-name { font-size:14px; }
.active:not(.immersive) #maneuver-points { font-size:24px; }
@media(max-width:760px) {
  .maneuver-feedback { padding:10px 14px; gap:3px 12px; }
  #maneuver-name { font-size:14px; }
  #maneuver-points { font-size:28px; }
}
@media(max-height:550px) and (orientation:landscape) {
  .maneuver-feedback { bottom:max(58px,calc(env(safe-area-inset-bottom) + 48px)); padding:8px 16px; }
  #maneuver-points { font-size:26px; }
  .immersive.has-maneuver .ocean-feedback { bottom:max(162px,calc(env(safe-area-inset-bottom) + 152px)); }
  .active:not(.immersive) .ride-guide { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:3px 12px; padding:7px 10px; }
  .active:not(.immersive) .weight-stats { grid-column:1; }
  .active:not(.immersive) .weight-stats span { display:none; }
  .active:not(.immersive) .flow-stats { grid-column:2; grid-row:1; }
  .active:not(.immersive) #weight-meter { grid-column:1; grid-row:2; margin:0; }
  .active:not(.immersive) #flow-meter { grid-column:2; grid-row:2; margin:0; }
  .active:not(.immersive) #balance-status { grid-column:1/-1; grid-row:3; margin:0; }
  .active:not(.immersive) #balance-risk { grid-column:1/-1; grid-row:4; margin:0; }
}

/* 男女別の体型と顔のプレビュー */
.equipment-face-toggle { display:block; margin:-8px 0 12px auto; min-height:40px; padding:8px 14px; border:1px solid #cad6cf; border-radius:9px; color:#23515b; background:#f7f5eb; font:inherit; font-size:12px; cursor:pointer; }
.equipment-view-tools{display:flex;justify-content:flex-end;gap:8px;margin:-8px 0 12px}.equipment-view-tools .equipment-face-toggle{margin:0}.equipment-face-toggle[aria-pressed=true]{background:#23515b;color:#fff}
.equipment-preview.is-body-view{height:300px}.body-shape-settings{padding:12px 14px;background:#e9eee7;border-radius:12px;margin:8px 0 18px}.body-shape-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.body-shape-heading h3{font-size:13px;margin:0}.body-shape-heading button{background:transparent;border:0;color:#345d62;font:inherit;font-size:11px;min-height:38px;padding:6px}.body-shape-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px}.body-shape-control{min-width:0;display:block}.body-shape-control>span{display:flex;justify-content:space-between;gap:5px;font-size:11px;line-height:1.6}.body-shape-control output{font-variant-numeric:tabular-nums;color:#23515b}.body-shape-control input{display:block;width:100%;min-width:0;margin:2px 0;height:34px;accent-color:#23515b}.body-shape-control small{display:block;font-size:10px;color:#607779}.body-shape-settings .field-note{margin:10px 0 0}
@media(max-width:600px){.equipment-preview.is-body-view{height:225px}.body-shape-settings{padding:10px}.body-shape-grid{gap:10px}.equipment-view-tools{gap:6px}.equipment-view-tools button{font-size:11px;padding:8px 10px}}
