/* V29: Rift interface — a restrained, mobile-first action RPG design.
   This file is presentation-only. The existing save, UI routing and game
   engine are intentionally untouched. */
:root{
  --bg:#0b1019;
  --panel:#151e2b;
  --panel2:#1b2738;
  --ink:#f5f7fb;
  --primary-text:#f5f7fb;
  --muted:#aebed0;
  --muted-readable:#bac7d7;
  --line:#2d3b50;
  --accent:#8ed7f7;
  --accent-strong:#a6e4ff;
  --gold:#f4cd82;
  --cyan:#9bdffd;
  --green:#8cdeb1;
  --red:#ffadad;
  --purple:#c9b3ff;
  --shadow:0 12px 35px #0003;
  --radius:14px;
  --surface-dark:#101824;
  --surface-raised:#1c293b;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Noto Sans KR","Malgun Gothic",sans-serif;
  font-size:16px;
  color-scheme:dark;
}
body{background:radial-gradient(ellipse at 50% -12%,#1c3046 0,transparent 45%),var(--bg);color:var(--ink);min-height:100dvh;-webkit-font-smoothing:antialiased}
button,input,summary{font-family:inherit}
button:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
button:disabled{opacity:.52;filter:none}
button:not(:disabled){transition:background-color .16s,border-color .16s,box-shadow .16s,transform .16s}
h1,h2,h3{color:var(--ink);letter-spacing:-.043em;word-break:keep-all}
h1{font-weight:830} h2{font-weight:800} h3{font-weight:750}
p,.simple-layout p{color:var(--muted-readable);font-size:16px;line-height:1.6;word-break:keep-all}
small{font-size:13px}
.gold,.money{color:var(--gold)}
.ink{color:var(--ink)}
.wrap{max-width:1050px;padding:0 24px}
.topbar{height:76px;border:0}
.brand{gap:11px;min-width:0}
.brand-symbol{width:46px;height:46px;flex:none;border:0;border-radius:0;background:none;box-shadow:none;color:var(--accent)}
.brand-symbol svg{width:100%;height:100%;filter:drop-shadow(0 0 10px #8ed7f73b)}
.brand small{font-size:13px;color:#b8c6d9;font-weight:650;letter-spacing:-.03em}
.brand strong{display:block;font-size:19px;font-weight:850;letter-spacing:-.04em;color:#eff7fd}
.save{font-size:13px;color:var(--muted)}
.quiet{color:#aebed0;min-height:44px;padding:5px;font-size:14px}
.nav{border:0;gap:5px;margin:0 0 24px;padding:6px;background:#101824;border:1px solid #28364b;border-radius:14px;box-shadow:0 9px 30px #03070e36;top:6px;z-index:10}
.nav button{border:0;border-radius:10px;color:#aabbd1;padding:11px 9px;min-height:51px;gap:7px;font-size:14px;font-weight:750}
.nav button.active{background:#263a52;border:0;box-shadow:inset 0 -2px var(--accent);color:#b5e9ff}
.nav button:not(.active):not(:disabled):hover{background:#1b293a;color:#e7f4fc}
.nav .rank-nav-dot{background:var(--gold);color:#101824;box-shadow:0 0 8px #f4cd8240}
.simple-layout{max-width:860px;scroll-margin-top:80px}
.simple-layout>.main{gap:16px;padding-bottom:28px}
.section-head{padding:0 1px;margin:3px 0 2px;min-height:35px;align-items:center}
.section-head h2{font-size:26px;font-weight:850;margin:0}
.panel,.offer,.special-card,.guild-card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.panel.standard,.standard,.contract-detail,.result-body,.story-body,.status-body{background:var(--panel)}
.simple-layout .standard{padding:20px;gap:14px}
.simple-layout .btn,.registry-controls .btn,.btn{border-radius:9px;min-height:46px;font-size:14px;letter-spacing:-.01em;box-shadow:none}
.btn.secondary,.simple-layout .btn.secondary{background:#243348;border:1px solid #3a506d;color:#e9f2fb}
.btn.secondary:not(:disabled):hover,.simple-layout .btn.secondary:not(:disabled):hover{background:#304760;border-color:#699bb9}
.btn.primary,.simple-layout .btn.primary{background:var(--accent);border:1px solid var(--accent);color:#102433;font-weight:850;box-shadow:0 4px 13px #429bd326}
.btn.primary:not(:disabled):hover,.simple-layout .btn.primary:not(:disabled):hover{background:#b8eaff;color:#102433}
.btn.quiet-btn,.simple-layout .quiet-btn{background:transparent;border-color:#35465c;color:#c4d0dd}
input,.registry-control-body input{background:#0e1724;border:1px solid #3a4b62;border-radius:10px;padding:14px 15px;min-height:49px;color:#f5f7fb}
input::placeholder{color:#9aaec3}
label,.registry-control-body label{color:#c9d4e2;font-size:15px}
.badge,.simple-layout .badge{font-size:13px;background:#202c3e;color:#d1deee;border:1px solid #3c506b;border-radius:6px;padding:5px 8px}
.badge.money{color:var(--gold);background:#2d291f;border-color:#675431}
.badge.rare{background:#302745;color:#dac6ff;border:1px solid #68528b}
.overline,.simple-layout .overline{font-family:inherit;font-size:14px;font-weight:750;color:var(--accent);letter-spacing:0}
.meter{height:6px;border-radius:20px;background:#0d1522;overflow:hidden}
.meter i{border-radius:20px;background:var(--accent)}
.meter.hp i{background:var(--green)}
.meter.fatigue i{background:#f2bf83}
.meter.skill i{background:#b8a9ff}
[data-tier="0"],[data-tier="1"],.g0,.g1{--tier:#c9d5e4}
[data-tier="2"],.g2{--tier:#8cdeb1}
[data-tier="3"],.g3{--tier:#9bdbff}
[data-tier="4"],.g4{--tier:#c8b8ff}
[data-tier="5"],.g5{--tier:#f5cd82}
[data-tier="6"],.g6{--tier:#ffabab}
[data-tier="7"],.g7{--tier:#f7b4e8}
[data-tier="8"],.g8{--tier:#ffdc88}
.grade,.grade.g0,.grade.g1,.grade.g2,.grade.g3,.grade.g4,.grade.g5,.grade.g6,.grade.g7,.grade.g8{border:1px solid color-mix(in srgb,var(--tier) 48%,#263548);background:color-mix(in srgb,var(--tier) 13%,#131d2b);color:var(--tier);border-radius:7px;font-weight:850;font-family:inherit}
.grade.g8{box-shadow:0 0 11px #ffd97850;background:#3a3020}
.hunter-summary{position:relative;isolation:isolate;padding:0;background:#152131;overflow:hidden;border-color:#344963}
.hunter-header-art{position:absolute;left:0;right:0;top:0;height:112px;z-index:-1;pointer-events:none;overflow:hidden}
.hunter-header-art .scene{background-position:center 45%;opacity:.45}
.hunter-header-art .scene:after{background:linear-gradient(90deg,#101a29 0%,#142233a8 50%,#13243830),linear-gradient(0deg,#152131,transparent 45%)}
.hunter-identity{padding:15px 19px;min-height:106px;gap:14px;position:relative;z-index:1}
.hunter-mini-portrait{width:78px;height:78px;border-radius:12px;border:1px solid color-mix(in srgb,var(--tier) 52%,#3b4b60);background:radial-gradient(ellipse at 48% 28%,#455a74,#182538 80%);box-shadow:0 3px 15px #03071145}
.hunter-mini-portrait .webtoon-portrait{width:100%;height:100%}
.hunter-id-text>div{gap:10px}
.hunter-id-text .grade{min-width:34px;height:33px;font-size:20px;line-height:1}
.hunter-id-text strong{font-size:23px;font-weight:850}
.hunter-id-text p{color:#c5d0df;font-size:14px;margin:5px 0 0}
.profile-link{background:#1a2d43dc;color:#b3e7ff;border:1px solid #506a85;border-radius:9px;min-height:44px;display:inline-flex;align-items:center;font-weight:750}
.hunter-stats{padding:13px 19px 16px;margin:0;background:#111b29c9;border-top:1px solid #35475d;gap:0}
.hunter-stats>div{padding:0 15px;gap:6px;border-color:#304158}
.hunter-stats span,.profile-key-stats span{color:#b9c9dc;font-size:14px}
.hunter-stats b{font-size:21px;font-weight:850;font-variant-numeric:tabular-nums}
.hunter-stats small{font-size:12px;color:#b1bfd0}
.hunter-stats .meter{height:5px}
.hunter-injury{margin:0;padding:8px 19px;color:#ffb9b9;background:#46242a;font-size:14px}
.home-requests,.special-requests{background:transparent;border:0;box-shadow:none;padding:3px 0 0;overflow:visible}
.home-section-title{margin:0 0 12px;align-items:center}
.home-section-title h1,.home-section-title h2{font-size:25px;line-height:1.2;font-weight:850}
.home-section-title p{font-size:14px;margin-top:4px;color:#aebed0}
.home-section-title>span{font-size:13px;color:#b5c4d7}
.request-list{gap:9px}
.request-row{border:1px solid #2c3c52;min-height:92px;border-radius:12px;background:#182433;grid-template-columns:122px minmax(0,1fr) auto;gap:14px;padding:0 16px 0 0;overflow:hidden;position:relative;isolation:isolate}
.request-row::before{content:"";height:100%;width:3px;position:absolute;left:0;top:0;background:var(--tier);z-index:2;opacity:.9}
.request-row:hover,.request-row:focus-visible{border-color:color-mix(in srgb,var(--tier) 55%,#40566e);background:#22344a}
.request-thumb{height:100%;min-height:92px;border-radius:0;display:flex;align-items:flex-end;justify-content:flex-start;padding:9px;overflow:hidden}
.request-thumb .scene{transition:transform .25s}
.request-row:hover .request-thumb .scene{transform:scale(1.045)}
.request-thumb .scene:after{background:linear-gradient(90deg,#0b121d24,#18243345),linear-gradient(0deg,#101722b8,transparent 50%)}
.request-thumb .grade{margin:0;background:#111c2bdc;font-size:17px;min-width:33px;border:1px solid var(--tier);border-radius:6px;padding:4px 7px}
.request-copy{padding:9px 0;gap:5px}
.request-copy strong,.event-compact strong{font-size:18px;color:#f3f7fc;font-weight:800;line-height:1.28}
.request-copy small{font-size:14px;color:#c5d2e0;line-height:1.35}
.request-cta{color:#bceaff;background:#293f56;border:1px solid #46627e;font-size:14px;border-radius:8px;padding:11px 19px;min-width:66px;text-align:center}
.special-request{grid-template-columns:75px minmax(0,1fr) auto;min-height:83px}
.request-grade{height:100%;min-height:83px;border-radius:0;background:#111b29}
.request-label{color:var(--gold);font-size:13px}
.event-compact{border:1px solid #54466b;background:#22273b;border-radius:11px}
.home-alert{background:linear-gradient(100deg,#26364a,#192b3c);border:1px solid #5a7f9e;border-left:4px solid var(--accent);border-radius:12px;gap:12px;padding:13px 15px}
.home-alert .home-alert-icon{color:var(--accent)}
.home-alert strong{color:#e4f5ff}
.home-alert p{color:#c5d5e4;font-size:14px}
.home-alert.branch{background:#272a40;border-color:#635c8a;border-left-color:var(--purple)}
.home-alert.invite{background:#1b3637;border-color:#4c7c78;border-left-color:var(--green)}
.home-alert.branch .home-alert-icon{color:var(--purple)}
.home-alert.invite .home-alert-icon{color:var(--green)}
.special-shortcut{color:var(--accent)!important;min-height:44px}
.next-rank-compact{background:#182638;border-color:#3b516e;padding:15px 17px;grid-template-columns:115px minmax(0,1fr) auto;gap:16px}
.next-rank-compact strong{font-size:20px;color:#f1f5fa;font-weight:800}
.next-rank-progress span,.small-neutral{font-size:14px;color:#b9c9db}
.next-rank-progress b{color:var(--accent-strong)}
.next-rank-progress .meter{height:7px;background:#0f1825}
.home-quick{gap:9px}
.home-quick button{background:#172333;color:#dce7f4;border:1px solid #33465e;border-radius:11px;min-height:60px;font-size:14px}
.home-quick button:hover{background:#243950;border-color:#6896b3}
.home-quick .ico{color:var(--accent)}
.profile-tabs{padding:5px;background:#101925;border:1px solid #2e3e54;border-radius:12px;gap:5px}
.profile-tabs button{border:0;background:none;color:#becde0;border-radius:8px;gap:6px;min-height:72px}
.profile-tabs button .ico{color:#9bb8d4}
.profile-tabs button.active{background:#263d54;color:#bceaff;box-shadow:inset 0 -2px var(--accent)}
.profile-tabs button.active .ico{color:var(--accent)}
.profile-notice{background:var(--gold);color:#211b10;border-radius:5px;font-size:11px}
.profile-overview{background:#172334;border-color:#33475f;grid-template-columns:minmax(185px,.85fr) 1.4fr}
.profile-art{background:#172a40}
.profile-art .scene:after{background:linear-gradient(0deg,#0b1726c9,transparent 80%)}
.profile-overview-body h2{font-size:27px}
.profile-overview-body>p{color:#b9c9db;margin:9px 0 17px}
.profile-key-stats{gap:7px}
.profile-key-stats>div{background:#101925;border:1px solid #30435a;border-radius:8px;padding:12px 13px}
.profile-key-stats b{font-size:22px;font-weight:850}
.simple-details{border-color:#30425a}
.simple-details summary{font-size:15px;color:#c6d9ef;min-height:44px}
.simple-details[open] summary{color:var(--accent)}
.profile-detail-list .statline{color:#bacadd}
.advancement-intro{background:#19283a;border-color:#3b5372}
.advancement-intro h3{color:var(--accent-strong);font-size:20px}
.simplified-branches .branch{padding:17px}
.simplified-branches .branch.branch-ready{background:#1d3344;border-color:var(--accent)}
.simplified-branches .branch.chosen{border-color:var(--gold);background:#302c26}
.branch-requirements{background:#101926;border-radius:8px}
.req-missing{color:#c5ceda}.req-done{color:var(--green)}
.branch-top h3{font-size:20px}
.skill-main-intro p{color:#bacadd;font-size:14px}
.skill-main-intro b{color:#f0f6ff}
.skill-row,.item-row,.skill-row+.skill-row,.leader-row,.person-row,.archive-row,.log-row,.split+.split{border-color:#2f4054}
.skill-simple .skill-row{padding:15px 0 0}
.skill-simple .skill-row h3{font-size:18px}
.skill-simple .skill-row p{font-size:16px;color:#c4d0df}
.skill-simple .skill-row small{color:#b3c2d4;font-size:13px}
.skill-icon,.item-pic,.equip-slot-icon,.job-icon{background:#22354a;border-color:#3d5570;border-radius:9px}
.skill-evolution-detail summary{min-height:40px;font-size:14px}
.skill-need{color:var(--gold)}
.shop-filters,.tab-strip{gap:6px}
.shop-filters button,.tab-strip button{background:#172333;border-color:#364c66;color:#bbcadd;border-radius:8px;min-height:44px;font-size:14px;padding:9px 13px}
.shop-filters button.active,.tab-strip button.active{background:#29445c;color:#c4edff;border-color:#70afd2}
.equip-slot{background:#111c2b;border:1px solid #354a65;border-radius:9px}
.equip-slot span{font-size:13px;color:#b8c7da}.equip-slot strong{font-size:15px}
.item-row h3,.simple-layout .item-row h3{font-size:17px}
.item-row p,.simple-layout .item-row p{font-size:14px;color:#becddd}
.item-pic.rare{background:#312844;border-color:#7a62a0}.item-pic.legendary{background:#3b3020;border-color:#9e7c42}
.item-rarity{color:#c9b5ff;font-size:13px}
.rank-path>div{background:#101a29;border-color:#334b65;border-radius:7px;color:#a6b7cb;font-size:14px}
.rank-path .current{color:var(--accent);border-color:var(--accent);background:#213950}
.rank-path .past{color:var(--green);background:#1b302f}
.tip,.first-tip{background:#14283d;border-color:#65afdb;color:#c1d9ec;border-radius:8px;font-size:14px;line-height:1.55}
.balance-warning,.special-contract,.progression-contract,.promotion-goal,.foundation-goal{background:#1a293a;border-color:#3e536b;border-radius:11px}
.result-detail{border-color:#304157;color:#f1f5fb}
.result-detail>span,.simple-layout .result-detail span{color:#bdcbdc}
.simple-layout .micro,.simple-layout .mini-note{font-size:14px;color:#b1c1d1}
.contract-detail{padding:18px;border-color:#32455e}
.contract-head{margin-bottom:14px}
.contract-detail .contract-head h2{font-size:25px}
.contract-detail .contract-head p{font-size:14px;color:#b7c9db}
.contract-detail .mission-visual{border-radius:10px;border-color:#354a63;aspect-ratio:2.55;max-height:300px;margin-bottom:14px}
.mission-visual .scene:after{background:linear-gradient(180deg,#08121d30,transparent 40%,transparent 70%,#0a1429a0)}
.mission-brief{font-size:15px}
.mission-condition{background:#1d3046;border:1px solid #395a79;border-left:3px solid var(--accent);border-radius:9px;padding:12px 14px}
.mission-condition strong{color:#d8f2ff;font-size:19px}
.mission-condition>span{color:#b3c7dc;font-size:14px}
.mission-condition p{color:#c8d6e5;font-size:15px}
.tactic-detail{margin-top:7px}
.choice-list{gap:9px}
.choice,.story-choice{border:1px solid #37506e;border-left:3px solid #8ac9ee;background:#17273a;box-shadow:none;border-radius:11px}
.choice:hover{border-color:#8ed7f7;background:#20364d}
.choice:nth-child(2){border-left-color:#f0c881}
.choice:nth-child(3){border-left-color:#8cdeb1}
.clear-choice[data-i="3"],.clear-choice[data-i="4"],.clear-choice.ultimate-choice{border-color:#8170b5;border-left-color:#ceb8ff;background:#282942}
.clear-choice{display:flex;align-items:center;min-height:98px;padding:13px 15px;gap:16px}
.clear-choice .choice-main{gap:4px}
.clear-choice .choice-main strong{font-size:19px;font-weight:820;color:#f6f8fb;line-height:1.35}
.clear-choice .choice-main small{font-size:14px!important;color:#c0cfe1;line-height:1.45}
.clear-choice .choice-pay{font-size:14px;color:var(--gold)}
.clear-choice .prob{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;min-width:76px;line-height:1.05;font-size:29px}
.clear-choice .prob small{color:#c0cde0;font-size:12px;margin:6px 0 7px}
.chance-meter{display:block;background:#0c1725;width:100%;height:4px;border-radius:6px;overflow:hidden}
.chance-meter:before{content:"";display:block;width:var(--chance,0%);height:100%;background:currentColor;border-radius:6px}
.choice-number{border:0;background:#263a50;color:#bce8ff;border-radius:7px}
.story-body,.result-body{padding:22px}
.story-text,.simple-layout .story-text{font-size:16px;line-height:1.85;color:#e0e9f4}
.story-panel.rare-panel{border-color:#66568a}
.story-art,.ending-art{border-bottom:1px solid #31455f}
.result-art.has-action-fx .result-content{background:#172333;border-color:#344b64}
.result-content h1{font-size:28px;letter-spacing:-.045em}
.result-symbol{border-radius:12px;background:#213c3b;border-color:#4d8c75}
.result-symbol.failure{background:#432d38;border-color:#a7758b}
.result-content .overline{color:var(--accent)}
.result:has(.result-symbol.success) .result-content .overline{color:var(--green)}
.result:has(.result-symbol.failure) .result-content .overline{color:var(--red)}
.reward-summary{background:#121e2d;border-color:#364c66;border-radius:11px}
.reward-summary>div{background:#1a2a3d;border-color:#364b64;border-radius:8px}
.reward-summary strong{font-size:25px;color:var(--gold)}
.reward-summary span{font-size:14px;color:#bbcadc}
.miracle-alert,.milestone-alert{border-radius:9px;background:#382f22;border-color:#997c43;color:#ffe0a3}
.ranking-delta,.career-highlights,.ending-unlock-notice,.next-route,.tech-unlocks article{border-radius:10px;border-color:#415775;background:#202d3e}
.loot-alert{border-radius:10px;background:#282640;border-color:#71629c}
.result-continue{background:#0f1928;border-top-color:#354b65}
.guild-card,.guild-current,.recruitment-card,.recruitment-package,.recruitment-terms>div,.guild-task-body{background:var(--panel);border-color:#35475d}
.guild-crest{background:#1b2a3c}
.leader-row.you{background:#223b4e;border-color:#6ab4d6}
.ending-tile{background:#121d2b;border:1px solid #354862;border-radius:10px}
.ending-tile.locked{opacity:1;color:#bac9db}
.ending-tile.locked h3{color:#bfcde0}.ending-tile.locked p{color:#abbdcf;font-size:14px}
.ending-tile.unlocked{border-color:#b39251;background:#302b24}
.ending-silhouette{color:#7188a3}
.ending-title h1{color:#f4d79b}
.pixel-registration{max-width:970px;margin:12px auto 22px;gap:16px}
.registry-intro h1,.registry-intro>h1{font-size:29px;letter-spacing:-.04em;font-weight:860}
.registry-intro p{font-size:16px;color:#b8c8da}
.registry-grid{gap:16px}
.register-preview{border-radius:14px;background:#172333;border-color:#344b65;box-shadow:var(--shadow)}
.registry-stage:after{border:0;inset:0;box-shadow:none}
.registry-stage .registry-backdrop:after{background:linear-gradient(0deg,#0f1929f0,transparent 32%,transparent 70%,#0c172d35)}
.registry-caption{z-index:4}
.registry-caption small{font-size:13px;color:#c3d1e0}
.registry-caption strong{font-weight:850;color:#f8fafc;letter-spacing:-.035em}
.registry-footer{background:#182b40;border-color:#374e69;padding:13px 16px}
.registry-footer .grade{font-family:inherit;font-size:25px;border-color:#8598b0;color:#d8e5f3;background:#26374b;border-radius:9px}
.registry-footer>div b{font-size:16px;color:#f1f6fb}
.registry-footer>div small{font-size:13px;color:#b9c9db}
.registry-controls{background:#152030;border-color:#334860}
.registry-control-body{padding:19px;gap:12px}
.registry-controls .job-select{border:1px solid #334966;background:#192a3d;border-radius:9px;min-height:64px;padding:8px}
.registry-controls .job-select strong{color:#e9f3fc;font-size:16px}
.registry-controls .job-select small{color:#bdcce0;font-size:13px;white-space:normal}
.registry-controls .job-select.selected{background:#29435b;border-color:var(--accent);box-shadow:inset 0 0 0 1px #8ed7f729}
.selected-check{color:#b6e8ff}
.register-job h2{font-size:21px}
.register-actions .btn{min-height:49px;font-size:16px}
.appearance-toggle span{color:#b7c7da;font-size:14px}
.pixel-custom-section,.wardrobe-title{border-color:#34475f}
.pixel-custom-head h3:before{background:var(--accent);transform:none;height:14px;width:3px;border-radius:2px}
.pixel-custom-head>span{color:var(--accent);font-size:13px}
.pixel-custom-choice{background:radial-gradient(ellipse at 50% 24%,#3a4d67,#152235 82%);border-color:#405571;border-radius:9px}
.pixel-custom-choice.selected,.gender-options button.selected{background:radial-gradient(ellipse at 50% 20%,#3d6886,#223f57);border:1px solid var(--accent);box-shadow:inset 0 0 0 1px #8ed7f750}
.pixel-custom-choice span,.pixel-custom-choice.selected span{color:#edf6ff;font-size:13px}
.gender-options button{background:#15273b;border-color:#3c5571;border-radius:9px}
.gender-options button small,.gender-label small{color:#bdccdf;font-size:13px}
.gender-label{color:#e7f1fa}
.pixel-registration .register-preview{position:sticky;top:12px}
footer{margin:18px 0 12px;font-size:13px;color:#a5b5c9;letter-spacing:0}
footer .quiet{font-size:13px}
#toast{background:#22374b;border:1px solid #6888a6;color:#e9f5ff;border-radius:10px;font-size:15px}
@media(max-width:700px){
  .wrap{padding:0 12px}
  .topbar{height:64px;padding:0 1px}
  .brand{gap:7px}
  .brand-symbol{width:35px;height:35px}
  .brand small{font-size:12px}
  .brand strong{font-size:15px}
  .top-right{gap:3px}
  .top-right .quiet{font-size:13px}
  .nav{top:3px;gap:2px;margin-bottom:13px;padding:4px;border-radius:12px}
  .nav button{min-height:53px;padding:5px 2px;border-radius:8px;font-size:13px;gap:5px;flex-direction:column}
  .nav button .ico{width:21px;height:21px}
  .simple-layout>.main{gap:13px}
  .section-head h2{font-size:23px}
  .simple-layout .standard{padding:15px;gap:12px}
  .hunter-header-art{height:94px}
  .hunter-identity{min-height:90px;padding:11px 12px;gap:10px}
  .hunter-mini-portrait{height:64px;width:64px;border-radius:10px}
  .hunter-id-text strong{font-size:20px}
  .hunter-id-text .grade{font-size:18px;min-width:30px;height:30px}
  .hunter-id-text>div{gap:7px}
  .hunter-id-text p{font-size:13px}
  .profile-link{font-size:13px;padding:8px 10px}
  .hunter-stats{padding:11px 12px 13px;grid-template-columns:1.12fr 1fr 1fr 1.06fr}
  .hunter-stats>div{padding:0 7px;gap:5px}
  .hunter-stats span{font-size:13px}
  .hunter-stats b{font-size:17px}
  .hunter-stats small{font-size:11px}
  .home-section-title{margin-bottom:10px}
  .home-section-title h1,.home-section-title h2{font-size:23px}
  .home-section-title p{font-size:14px}
  .home-section-title>span{font-size:13px}
  .request-row{grid-template-columns:82px minmax(0,1fr) auto;min-height:78px;padding-right:9px;gap:10px;border-radius:11px}
  .request-thumb{min-height:78px;padding:7px}
  .request-thumb .grade{font-size:15px;padding:3px 6px;min-width:29px}
  .request-copy strong,.event-compact strong{font-size:16px}
  .request-copy small{font-size:13px}
  .request-cta{font-size:13px;min-width:51px;padding:10px 9px}
  .special-request{grid-template-columns:49px minmax(0,1fr) auto;min-height:74px}
  .request-grade{min-height:74px}
  .home-alert{padding:10px 11px;gap:8px;grid-template-columns:27px minmax(0,1fr) auto}
  .home-alert strong{font-size:15px}
  .home-alert p{font-size:13px}
  .home-alert .btn{font-size:13px;padding:7px 10px}
  .next-rank-compact{grid-template-columns:73px minmax(0,1fr) auto;gap:9px;padding:12px}
  .next-rank-compact strong{font-size:16px}
  .next-rank-progress span,.small-neutral{font-size:13px}
  .next-rank-compact .btn{padding:7px 9px;font-size:13px}
  .home-quick{gap:6px}
  .home-quick button{min-height:66px;flex-direction:column;gap:6px;font-size:13px}
  .profile-tabs{gap:3px}
  .profile-tabs button{min-height:68px}
  .profile-tabs button strong{font-size:14px}
  .profile-overview{grid-template-columns:108px minmax(0,1fr)}
  .profile-overview-body{padding:12px}
  .profile-overview-body h2{font-size:22px}
  .profile-overview-body>p{font-size:14px;margin:7px 0 12px}
  .profile-key-stats>div{padding:8px;min-width:0}
  .profile-key-stats span{font-size:13px}
  .profile-key-stats b{font-size:17px;overflow-wrap:anywhere}
  .simple-details summary{font-size:14px}
  .contract-detail{padding:13px}
  .contract-detail .contract-head h2{font-size:21px}
  .contract-detail .mission-visual{aspect-ratio:1.85;max-height:225px}
  .clear-choice{padding:12px 11px;gap:8px}
  .clear-choice .choice-main strong{font-size:17px}
  .clear-choice .choice-main small{font-size:14px!important}
  .clear-choice .prob{font-size:26px;min-width:59px}
  .clear-choice .prob small{font-size:12px}
  .mission-condition p{font-size:14px}
  .result-body,.story-body{padding:15px}
  .result-content h1{font-size:25px}
  .result-body:has(.result-continue){padding-bottom:90px}
  .result-continue{padding:10px max(12px,env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom))}
  .registry-intro h1,.registry-intro>h1{font-size:25px}
  .registry-intro p{font-size:15px}
  .registry-grid{display:flex;flex-direction:column;gap:12px;align-items:stretch}
  /* Keep the preview from covering form controls as the user scrolls. */
  .pixel-registration .register-preview{position:relative;top:auto;z-index:1}
  .registry-stage{height:clamp(240px,34dvh,310px)}
  .registry-control-body{padding:14px}
  .registry-controls .job-select{min-height:60px}
  .registry-controls .job-select strong{font-size:14px}
  .registry-controls .job-select small{font-size:12px}
  .registry-controls .job-select .job-icon{width:32px;height:32px}
  .registry-controls .job-select .job-icon svg{width:25px;height:25px}
  .registry-control-body .job-grid{gap:6px}
  .register-job h2{font-size:19px}
  .gender-options button small{font-size:12px}
  .backup-controls{flex-wrap:wrap;justify-content:center}
}
@media(max-width:375px){
  .wrap{padding:0 9px}
  .brand strong{font-size:14px}
  .nav button{font-size:12px}
  .hunter-stats b{font-size:15px}
  .hunter-stats>div{padding:0 5px}
  .hunter-stats span{font-size:12px}
  .hunter-identity{gap:8px}
  .hunter-mini-portrait{width:57px;height:57px}
  .hunter-id-text strong{font-size:18px}
  .request-row{grid-template-columns:65px minmax(0,1fr) auto;gap:8px}
  .special-request{grid-template-columns:45px minmax(0,1fr) auto}
  .request-copy small{font-size:12px}
  .request-cta{padding:9px 8px}
  .home-quick button{font-size:12px}
  .profile-overview{grid-template-columns:94px minmax(0,1fr)}
  .profile-key-stats span{font-size:12px}
  .profile-key-stats b{font-size:16px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
/* Keep the mission itself, rather than navigation chrome, in the first viewport. */
.contract-head>div:first-child{min-width:0;flex:1}
.contract-actions{display:flex;flex:none;align-items:center;gap:8px}
.contract-actions .contract-back{min-height:44px;padding:8px 13px}
.mission-condition{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:5px 10px}
.mission-condition strong{margin:0}
.mission-condition p{grid-column:1/-1;margin:0}
@media(max-width:700px){
  .contract-head{gap:7px}
  .contract-head h2{flex-wrap:wrap;gap:5px!important}
  .contract-actions{gap:5px}
  .contract-actions .badge{font-size:12px;padding:5px 6px}
  .contract-actions .contract-back{font-size:13px;padding:7px 9px;min-height:44px}
  .contract-detail .mission-visual{aspect-ratio:2.25;max-height:186px;margin-bottom:10px}
  .mission-condition{padding:9px 11px;gap:5px 8px}
  .mission-condition strong{font-size:18px}
  .mission-condition>span{font-size:13px}
}

/* V30 — relationship events: compact, readable on touch screens */
.opening-call{position:relative;isolation:isolate;overflow:hidden;margin:12px 0;padding:18px;display:flex;align-items:center;min-height:160px;border-color:#668aab;background:#16283e;}
.opening-copy{position:relative;z-index:2;width:min(100%,440px);}
.opening-image{position:absolute;inset:0;z-index:-1;opacity:.45;}
.opening-image:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#102035 12%,#102035ae 61%,#10203533);}
.opening-call h2,.bond-header h2{font-size:20px;line-height:1.35;margin:4px 0 6px;color:#f0f5ff;word-break:keep-all;}
.opening-call p{font-size:14px;color:#cfdbed;line-height:1.55;max-width:270px;margin:0 0 12px;word-break:keep-all}
.bond-kicker{color:#8ecbe9;font-weight:800;font-size:13px;letter-spacing:.04em}
.opening-actions{display:flex;gap:8px;flex-wrap:wrap;}
.opening-actions .btn{min-height:44px;}
.bond-event{margin:12px 0;padding:16px;border-color:#517b99;background:linear-gradient(145deg,#192b43,#141e30);}
.bond-header{display:flex;align-items:center;gap:12px}
.bond-portrait,.bond-mini{overflow:hidden;flex:none;background:#23394e;border:1px solid #63809a;border-radius:12px;position:relative;display:flex;align-items:center;justify-content:center;}
.bond-portrait{width:72px;height:78px;}
.bond-portrait > *, .bond-mini > *{width:100%;height:100%;object-fit:contain;}
.bond-quote{color:#dce7f5;font-size:15px;line-height:1.7;margin:12px 0;word-break:keep-all;}
.bond-options{display:grid;gap:8px;}
.bond-option{display:block;text-align:left;width:100%;min-height:62px;background:#23354b;border:1px solid #567695;border-radius:9px;padding:12px 13px;color:#eef3fb;cursor:pointer;word-break:keep-all;}
.bond-option strong,.bond-option small{display:block;}
.bond-option strong{font-size:15px;font-weight:800;margin-bottom:5px;}
.bond-option small{color:#b8cee4;font-size:13px;line-height:1.5;}
.bond-option:disabled{opacity:.48;cursor:not-allowed;}
.bond-option:not(:disabled):hover{border-color:#9bcbef;background:#304b66;}
.bond-note{display:block;line-height:1.5;color:#b8c9dd;font-size:13px;margin-top:11px;}
.bond-strip{display:flex;gap:10px;align-items:center;padding:9px 12px;border:1px solid #36546e;background:#182b40;border-radius:10px;margin:10px 0;}
.bond-mini{width:40px;height:43px;}
.bond-strip b,.bond-strip small{display:block;font-size:14px;line-height:1.4;}
.bond-strip small{color:#abbed3;font-size:13px;}
.raid-partner,.bond-result{background:#1b3046;border:1px solid #456a8d;border-radius:9px;padding:10px 13px;margin:10px 12px;color:#cee7ff;font-size:14px;}
.raid-partner small{display:block;font-size:13px;margin-top:4px;color:#b8cce7;line-height:1.5;word-break:keep-all;}
.rematch-info{border-color:#b79a60;color:#f3d8a5;}
.bond-result{margin:9px 0;}
