/* Reference-inspired UI: restrained typography, cobalt controls, geometric vector motifs. */
:root{--ui-blue:#3446d7;--ui-blue-deep:#2738bf;--ui-ink:#171b31;--ui-muted:#7a8095;--ui-stroke:#e9eaf1;--ui-mint:#1bd0ae;--ui-purple:#b48af4}
body{font-family:'SUIT Variable','Noto Sans KR','Apple SD Gothic Neo',sans-serif;color:var(--ui-ink);background:#e9eaf1;letter-spacing:-.025em}
button,input{font-family:inherit}
.app-shell{background:#fff}
.global-header{background:#fff;border-bottom:1px solid #f1f1f5;height:54px;min-height:54px;padding:0 22px}
.brand-text{gap:0}.brand-text strong{font-family:'SUITE','SUIT Variable',sans-serif;font-weight:800;font-size:17px;letter-spacing:-.045em;color:#202540}
.brand-tag{font:600 10px/1 'SUIT Variable',sans-serif;letter-spacing:.13em;color:#9a9fb1}

/* Input screen: small vector hero, clear type scale, compact centered controls. */
.entry{display:grid;grid-template-rows:minmax(0,44%) minmax(0,56%)}
.entry-illustration{height:100%;background:#fff;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:9px 20px 5px;gap:0;isolation:isolate}
.entry-illustration:after{display:none}
.hero-art{width:100%;height:52%;min-height:0;display:flex;align-items:center;justify-content:center;flex:none}
.hero-art svg{display:block;height:100%;width:min(90%,275px);max-height:185px;overflow:visible;filter:drop-shadow(0 12px 14px #7777c71c)}
.entry-hero-text{position:relative;inset:auto;left:auto;right:auto;top:auto;transform:none;filter:none;text-align:center;color:var(--ui-ink);padding-top:5px}
.entry-hero-text h1{font-family:'SUITE','SUIT Variable',sans-serif;font-weight:800;line-height:1.18;letter-spacing:-.055em;font-size:clamp(27px,7.3vw,34px);margin:0 0 8px;color:var(--ui-ink)}
.entry-hero-text h1 em{font-style:normal;color:var(--ui-blue);text-shadow:none}
.entry-hero-text p{color:#82869c;font-size:13px;font-weight:500;line-height:1.4;letter-spacing:-.015em}
.entry-form-panel{background:#fff;padding:12px 24px 16px;justify-content:center;align-items:center;gap:18px}
.form-heading{font-family:'SUITE','SUIT Variable',sans-serif;font-size:20px;font-weight:750;letter-spacing:-.05em;line-height:1.2;color:#24283e;margin:0 0 4px}
.field-title{color:#83879e;font-weight:600;font-size:13px;letter-spacing:-.02em;margin:0 0 9px}
.tier-selector{max-width:352px;gap:9px}
.tier-choice{height:54px;min-height:54px;border-radius:15px;border:1px solid #e6e8f1;background:#fff;box-shadow:0 3px 11px #22285c0a;color:#6b7190}
.tier-choice strong{font-family:'SUITE','SUIT Variable',sans-serif;font-size:16px;font-weight:700;letter-spacing:-.03em}
.tier-choice.active{border-color:var(--ui-blue);background:var(--ui-blue);color:#fff;box-shadow:0 5px 12px #3446d738}
.tier-choice.active strong{color:#fff}
.rank-block .field-title{margin-bottom:8px}
.rank-input-wrap{width:171px;height:60px;border:1px solid #e7e9f0;border-radius:17px;background:#fff;box-shadow:0 4px 16px #25317110;gap:5px;padding:0 13px}
.rank-input-wrap:focus-within{border-color:#8090f0;box-shadow:0 0 0 3px #e9ecff}
.rank-input-wrap input{font-family:'SUITE','SUIT Variable',sans-serif;font-size:36px;font-weight:800;letter-spacing:-.04em;width:107px;color:#293bd1;text-align:right}
.rank-input-wrap span{font-size:15px;font-weight:600;color:#858ba3;margin-top:6px}
.rank-presets{margin:11px auto 0;max-width:315px;gap:8px}
.rank-presets button{font-size:12px;font-weight:600;border:1px solid #e9eaf1;color:#858aa0;background:#fff;border-radius:13px;padding:7px 2px}
.rank-presets button.selected{background:#eef0ff;border-color:#cdd3ff;color:var(--ui-blue);font-weight:700}
.primary-button{height:55px;min-height:55px;width:min(100%,338px);border-radius:15px;background:var(--ui-blue);color:white;font-family:'SUIT Variable',sans-serif;font-size:16px;font-weight:750;letter-spacing:-.02em;margin:4px auto 0;box-shadow:0 6px 13px #3446d72b}
.primary-button:hover{background:var(--ui-blue-deep);transform:translateY(-1px)}
.form-note{font-size:12px;font-weight:500;color:#a1a4b3;line-height:1.4;margin:0}
.form-note span{color:#d2d3dd}

/* Two compact, illustratively abstract tier panels. */
.result{background:#fff}
.result-heading{padding:9px 16px 4px;min-height:54px}
.round-icon-button{font-size:12px;color:#737997;background:#fff;border:1px solid #e7e9f2;border-radius:12px;height:36px;width:54px;min-width:54px;font-weight:650}
.heading-center h1{font-family:'SUITE','SUIT Variable',sans-serif;font-size:21px;font-weight:800;color:#1b2141;letter-spacing:-.04em}
.map-context{height:28px;min-height:28px;border-radius:14px;margin:0 17px 9px;background:#f6f7fb;color:#898da2;font-size:12px;font-weight:600;letter-spacing:-.01em}
.map-world{margin:0 14px 14px;background:#fff;border-radius:0;gap:7px;overflow:visible;box-shadow:none}
.region{border-radius:19px;overflow:hidden;position:relative;isolation:isolate;background:var(--region-bg,#f5f6fc)!important;--tier-accent:#4453c9;--tier-shape:#a7b1ff}
.region[data-tier="1"]{--region-bg:#eef0ff;--tier-accent:#3446d7;--tier-shape:#aab7ff}
.region[data-tier="2"]{--region-bg:#f4efff;--tier-accent:#7157d8;--tier-shape:#d3bef9}
.region[data-tier="3"]{--region-bg:#eaf9f5;--tier-accent:#0a9f87;--tier-shape:#a4e9d9}
.region.empty{--region-bg:#f8f9fc;background:#f8f9fc!important}
.region-lower{border:0}
.region .scenery{position:absolute;inset:0;background:none!important;opacity:.34;transform:none!important;filter:none;transition:opacity .25s;pointer-events:none}
.region .scenery:before,.region .scenery:after{content:none}
.structure{position:absolute;display:block;background:var(--tier-shape);border-radius:18px 18px 2px 2px;filter:none}
.structure-a{height:104px;width:59px;top:26px;left:13%;transform:rotate(-8deg)}
.structure-b{height:142px;width:70px;top:0;left:40%;transform:rotate(8deg)}
.structure-c{height:93px;width:48px;top:31px;right:10%;transform:rotate(13deg)}
.structure-arch{height:82px;width:87px;top:53px;left:57%;border:13px solid var(--tier-shape);border-bottom:0;border-radius:50px 50px 0 0;background:transparent;transform:rotate(-8deg)}
.structure-sun{height:29px;width:29px;top:22px;right:20%;border-radius:50%;background:var(--ui-purple)}
.region[data-tier="2"] .structure{transform:scale(.8) rotate(8deg);transform-origin:center top}
.region[data-tier="3"] .structure{transform:scale(.62) rotate(-5deg);transform-origin:center top}
.region[data-tier="3"] .structure-sun{background:var(--ui-mint)}
.scenery-tint{display:none}
.region-top-label{z-index:3;top:16px;left:50%;transform:translateX(-50%);padding:6px 14px;background:#ffffffc7;border:1px solid #ffffffdd;box-shadow:0 4px 12px #3b47940a;border-radius:12px;color:#292e53;font-family:'SUITE','SUIT Variable',sans-serif;font-weight:800;font-size:19px;letter-spacing:-.04em}
.lower-top-label{top:60px}
.region-card{z-index:3;top:53%;bottom:auto;width:min(calc(100% - 38px),339px);min-height:0;left:50%;transform:translate(-50%,-50%);background:#ffffffed;border:1px solid #ffffff;border-radius:16px;box-shadow:0 8px 18px #3a408b10;padding:12px 12px 11px;text-align:center;color:#242940;backdrop-filter:blur(7px)}
.card-direction{font-size:12px;line-height:1.3;font-weight:650;color:#8d91a5;gap:7px}
.card-pill{font-size:12px;color:#a1a4b5;font-weight:500}
.card-pill:before{color:#c2c5d2;padding-right:7px}
.card-cutoff{font-family:'SUITE','SUIT Variable',sans-serif;font-size:27px;line-height:1.12;font-weight:800;letter-spacing:-.045em;color:var(--tier-accent);margin:4px 0 4px}
.card-cutoff.bad{font-size:23px;color:#aa6679}
.card-hint{font-size:12px;line-height:1.35;color:#81869b;font-weight:550;letter-spacing:-.018em}
.detail-chip{font-size:12px;font-weight:700;color:var(--tier-accent);text-decoration:none;margin:8px 0 0}
.detail-chip:hover{text-decoration:underline;text-underline-offset:3px}
.lower-card{top:55%;bottom:auto}
.more-level{z-index:4;top:18px;right:18px;height:30px;border:0;border-radius:11px;background:#fff;color:var(--tier-accent);box-shadow:0 3px 12px #3f45801c;padding:6px 11px;font-size:12px;font-weight:750}
.more-down{top:60px}
.region.empty .scenery,.region.empty .region-top-label,.region.empty .region-card{display:none}
.region.empty:before,.region.empty:after{content:none}
.center-bridge{z-index:10;top:50%;gap:6px}
.my-reward-button{width:min(calc(100% - 48px),330px);height:58px;min-height:58px;border-radius:16px;border:2px solid #fff;background:var(--ui-blue);box-shadow:0 8px 19px #3446d731;gap:15px;padding:6px 15px}
.my-reward-button:hover{background:var(--ui-blue-deep)}
.my-reward-text{gap:3px}
.my-reward-text small{font-size:12px;font-weight:550;color:#e0e4ff}
.my-reward-text strong{font-family:'SUITE','SUIT Variable',sans-serif;font-size:19px;line-height:1;font-weight:800;letter-spacing:-.025em}
.bridge-arrow{border-radius:10px;background:#eef0ff;color:var(--ui-blue);font-size:11px;font-weight:750;padding:7px 9px}
.reward-ticker{height:29px;min-height:29px;border:1px solid #eef0fb;box-shadow:0 5px 13px #22295714;background:#fff;color:#4b526e;border-radius:12px;font-size:12px;font-weight:700;gap:7px;padding:5px 11px}
.coin-mini{height:18px;min-height:18px;min-width:18px;font-size:12px}
.coin-mini.pink{background:#fae5f0;color:#d06a99}.coin-mini.brown{background:#f8ecdc;color:#b58144}.coin-mini.gold{background:#fff3cd;color:#cb9b33}
.region.swapping .scenery{animation:abstract-sweep .46s ease-out both}
.region.swapping .region-card{animation:panel-enter .46s cubic-bezier(.24,.8,.28,1) both}
@keyframes abstract-sweep{from{opacity:.05;translate:0 -12px}to{opacity:.34;translate:0 0}}
@keyframes panel-enter{0%{opacity:0;transform:translate(-50%,-38%) scale(.98)}100%{opacity:1;transform:translate(-50%,-50%) scale(1)}}

/* Detail sheets remain scrollable to avoid truncating exact reward numbers. */
.bottom-sheet{font-family:'SUIT Variable',sans-serif;background:#fff;border:0;padding:10px 22px max(24px,env(safe-area-inset-bottom));border-radius:24px 24px 0 0}
.sheet-header h2{font-family:'SUITE','SUIT Variable',sans-serif;font-size:22px;letter-spacing:-.04em;font-weight:800;color:#222847}
.sheet-header .eyebrow{color:var(--ui-blue);font-size:12px;letter-spacing:.01em}
.sheet-close{border-color:#e9eaf4;color:#666e91}
.sheet-summary{background:#f2f3ff;border-color:#e4e6ff}
.sheet-summary small{font-size:12px;color:#6d76ab}.sheet-summary strong{font-family:'SUITE','SUIT Variable',sans-serif;color:var(--ui-blue);font-size:24px}
.sheet-summary p,.sheet-tip,.settings-group p{font-size:13px;line-height:1.6}
.location-edit-trigger{display:block;width:100%;text-align:left;border:0;background:transparent;padding:0;color:inherit}
.location-trigger-title{display:flex;align-items:center;justify-content:space-between;gap:10px}
.location-edit-chip{font-size:12px;font-weight:750;line-height:1.2;color:var(--ui-blue);background:#fff;border:1px solid #dfe3ff;border-radius:9px;padding:6px 10px}
.location-edit-trigger:hover .location-edit-chip{background:#e4e7ff}
.location-edit-trigger strong{display:block;margin:6px 0 8px}
.location-edit-heading{font-family:'SUITE','SUIT Variable',sans-serif;font-size:18px;font-weight:800;color:#27315c;margin:1px 0 13px;text-align:center}
.location-tier-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.location-tier-choices button{border:1px solid #dde1f5;background:#fff;color:#707998;min-height:46px;border-radius:12px;font-weight:750;font-size:15px}
.location-tier-choices button.active{background:var(--ui-blue);color:#fff;border-color:var(--ui-blue);box-shadow:0 4px 10px #3446d723}
.location-rank-label{display:block;text-align:center;font-size:13px;font-weight:650;color:#6d76ab;margin:14px 0 7px}
.location-rank-field{display:flex;justify-content:center;align-items:center;gap:6px;width:170px;margin:0 auto;background:#fff;border:1px solid #dce0f2;border-radius:12px;height:48px;padding:0 13px}
.location-rank-field:focus-within{border-color:var(--ui-blue);box-shadow:0 0 0 3px #dee2ff}
.location-rank-field input{width:114px;min-width:0;border:0;background:none;text-align:right;outline:none!important;font-size:24px;font-weight:800;color:var(--ui-blue);font-family:'SUITE','SUIT Variable',sans-serif}
.location-rank-field span{font-size:14px;color:#777e98}
.location-edit-actions{display:grid;grid-template-columns:1fr 1.6fr;gap:8px;margin-top:15px}
.location-edit-actions button{min-height:44px;border-radius:12px;border:1px solid #dce0f2;background:#fff;color:#5d6789;font-size:14px;font-weight:750}
.location-edit-actions #applyCurrentPlace{background:var(--ui-blue);border-color:var(--ui-blue);color:#fff}
.reward-label,.slider-row label{font-size:13px}.reward-amount{font-size:19px}.reward-diff{font-size:14px}
.preset-button.active{background:var(--ui-blue);border-color:var(--ui-blue)}
.sheet-action{background:var(--ui-blue);font-weight:750;font-size:15px;border-radius:13px;box-shadow:none}
.settings-group h3,.sheet-minor-title{color:#292e54;font-size:15px}

@media(max-height:760px){
  .entry{grid-template-rows:minmax(0,39%) minmax(0,61%)}
  .hero-art{height:48%}
  .entry-form-panel{gap:12px;padding:8px 20px 13px}
  .form-heading{font-size:19px;margin:0}
  .tier-choice{height:50px;min-height:50px}
  .rank-input-wrap{height:55px}
  .rank-input-wrap input{font-size:33px}
  .primary-button{height:52px;min-height:52px}
  .region-card{padding:9px 10px;top:52%}
  .lower-card{top:55%}
  .card-cutoff{font-size:25px}
  .detail-chip{margin-top:5px}
}
@media(max-height:625px){
  .entry{grid-template-rows:minmax(0,33%) minmax(0,67%)}
  .hero-art{height:46%}
  .entry-hero-text h1{font-size:25px;margin-bottom:5px}
  .entry-hero-text p{font-size:12px}
  .entry-form-panel{gap:9px;padding:6px 16px 10px}
  .form-heading{font-size:18px}
  .tier-choice{height:45px;min-height:45px}
  .rank-input-wrap{height:49px}
  .rank-presets{margin-top:6px}
  .primary-button{height:47px;min-height:47px}
  .region-card{padding:7px 9px;top:52%}
  .lower-card{top:55%}
  .card-hint{font-size:11px}
  .card-cutoff{font-size:23px}
}
@media(max-width:360px){
  .global-header{padding:0 16px}
  .brand-text strong{font-size:15px}
  .entry-form-panel{padding-left:15px;padding-right:15px}
  .entry-hero-text h1{font-size:28px}
  .region-card{width:calc(100% - 24px)}
  .reward-ticker{font-size:11px;gap:5px}
}
