:root {
  --green: #2f6e9e; --green-d: #224f78; --red: #e24a3b; --cream: #fffaf0; --ink: #33302b;
  --sub: #6d675d; --line: #e6dccb; --yellow: #ffd34d; --blue: #3b7fd9;
  --fs: 16px;
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Meiryo", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #bfe3f5; color: var(--ink); font-size: var(--fs); }
body { word-break: normal; overflow-wrap: break-word; line-break: strict; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button { font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 10px 14px; background: #fff; color: var(--ink);
  box-shadow: 0 3px 0 rgba(0,0,0,.15); cursor: pointer; touch-action: manipulation; }
button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.15); }
button:disabled { opacity: .45; cursor: default; }
button.big { background: var(--green); color: #fff; font-size: 1.12em; padding: 13px 22px; box-shadow: 0 4px 0 var(--green-d); }
button.alt { background: #fff; color: var(--green); box-shadow: 0 4px 0 #cfc3ad; }
button.danger { background: #fde4e1; color: #b22a1c; }
input { font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; width: 100%; background: #fff; color: var(--ink); }
label { display: block; margin: 10px 0; font-weight: 700; font-size: .95em; }
label input { margin-top: 4px; }
.hidden { display: none !important; }

/* --- 画面（パネル） --- */
.screen { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 16px;
  background: rgba(30, 60, 45, .45); z-index: 20; }
.screen.on { display: flex; }
#loading { background: linear-gradient(160deg, #8fb3d6 0%, #f6f0d8 60%, #ffd9a8 100%); }
#title { background: linear-gradient(160deg, rgba(143,214,179,.55) 0%, rgba(246,240,216,.25) 60%, rgba(255,217,168,.5) 100%); }
.panel { background: var(--cream); border-radius: 22px; padding: 22px; width: min(460px, 100%); max-height: calc(100% - 8px);
  overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.panel.wide { width: min(860px, 100%); height: min(640px, 100%); display: flex; flex-direction: column; padding: 14px; }
.panel.small { width: min(400px, 100%); }
.panel.center { text-align: center; }
.panel h2 { margin: 0 0 12px; font-size: 1.35em; }
.logo { font-size: 2.6em; margin: 4px 0; color: var(--green); font-weight: 900; letter-spacing: .04em;
  text-shadow: 0 3px 0 #fff, 0 6px 0 rgba(0,0,0,.08); }
.logoArt { font-size: 4em; line-height: 1; }
.sub { margin: 0 0 16px; color: var(--sub); font-weight: 700; }
.who { font-weight: 700; color: var(--green-d); }
.col { display: flex; flex-direction: column; gap: 10px; margin: 14px auto; max-width: 300px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.note, .mini { font-size: .85em; color: var(--sub); }
.msg { min-height: 1.3em; color: #b22a1c; font-weight: 700; }
.msg.ok { color: var(--green-d); }
.back { margin-top: 10px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tabs button { flex: 1 1 auto; padding: 8px 10px; background: #efe7d6; box-shadow: none; font-size: .92em; }
.tabs button.on { background: var(--green); color: #fff; }
.grp { border-top: 2px dashed var(--line); margin-top: 10px; padding-top: 6px; }
.load { height: 14px; background: #fff; border-radius: 99px; overflow: hidden; margin: 14px 0; }
.load b { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.scroll { overflow: auto; }
.list { max-height: 50vh; }
.list .r { display: flex; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); align-items: center; }
.list .r.me { background: #fff2c2; border-radius: 8px; }
.list .r .n { width: 2.4em; font-weight: 900; color: var(--green); }
.list .r .s { flex: 1; text-align: left; }
.list .r .s small { display: block; color: var(--sub); }
.list .r .v { font-weight: 900; }
table.keys { width: 100%; border-collapse: collapse; font-size: .9em; }
table.keys td, table.keys th { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.92); border-radius: 99px; padding: 5px 11px;
  font-weight: 900; font-size: .9em; box-shadow: 0 2px 0 rgba(0,0,0,.12); white-space: nowrap; }
.chip.money { color: #1f3e7a; }

/* --- HUD --- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud button, #hud .chip { pointer-events: auto; }
#top { position: absolute; left: 0; right: 0; top: 0; padding: calc(env(safe-area-inset-top) + 8px) 10px 0; display: flex; flex-direction: column; gap: 6px; }
#top .row1, #top .row2 { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#top .sp { flex: 1; }
#hShop { font-weight: 900; font-size: 1.1em; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,.45); }
#hWho, #hMenu { padding: 6px 12px; }
.bar { display: inline-block; width: 52px; height: 8px; background: #e5e5e5; border-radius: 99px; overflow: hidden; font-style: normal; }
.bar b { display: block; height: 100%; width: 0; background: var(--yellow); }
.star { color: #e6a400; }
#hOpen.closed { background: #fde4e1; color: #b22a1c; }
#hOpen.open { background: #dff6e6; color: #1f3e7a; }
#cross { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.45); }
#cross.on { width: 14px; height: 14px; margin: -7px; background: var(--yellow); }
#prompt { position: absolute; left: 50%; top: calc(50% + 26px); transform: translateX(-50%); background: rgba(20,30,25,.72); color: #fff;
  padding: 6px 12px; border-radius: 10px; font-weight: 700; font-size: .95em; white-space: nowrap; display: none; }
#prompt.on { display: block; }
#hold { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 14px); transform: translateX(-50%); background: rgba(255,250,240,.95);
  padding: 6px 14px; border-radius: 12px; font-weight: 900; display: none; box-shadow: 0 3px 0 rgba(0,0,0,.15); white-space: nowrap; }
#hold.on { display: block; }
#toasts { position: absolute; left: 10px; top: 96px; display: flex; flex-direction: column; gap: 6px; max-width: 70vw; }
.toast { background: rgba(255,255,255,.95); padding: 6px 12px; border-radius: 10px; font-weight: 700; font-size: .9em;
  box-shadow: 0 2px 0 rgba(0,0,0,.12); animation: tin .25s ease-out; }
.toast.good { color: #1f3e7a; } .toast.bad { color: #b22a1c; } .toast.lv { background: var(--yellow); }
@keyframes tin { from { transform: translateX(-20px); opacity: 0; } }
#guide { position: absolute; right: 10px; top: 96px; width: min(330px, 60vw); background: #fffaf0; border-radius: 16px; padding: 10px 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); border: 3px solid var(--green); pointer-events: auto; }
#guide .who { font-weight: 900; color: var(--green); font-size: .85em; }
#guideText { font-weight: 700; margin: 4px 0 6px; }
#guideSkip { font-size: .75em; padding: 4px 8px; background: #efe7d6; box-shadow: none; }
#arrow { position: absolute; left: 50%; top: 50%; font-size: 44px; color: var(--yellow); text-shadow: 0 0 6px rgba(0,0,0,.6);
  transform-origin: 50% 50%; margin: -26px 0 0 -18px; }
#lockHint { position: absolute; left: 50%; top: 72%; transform: translateX(-50%); background: rgba(20,30,25,.78); color: #fff; padding: 12px 18px;
  border-radius: 14px; text-align: center; font-weight: 900; }
#lockHint small { font-weight: 500; }

/* 名前を きめる */
.nameRow { display: flex; gap: 8px; margin-top: 4px; }
.nameRow input { flex: 1; min-width: 0; font-size: 1.15em; }
.nameRow button { min-width: 52px; font-size: 1.3em; }
#naming label { display: block; text-align: left; margin: 10px 0; font-weight: 700; }

.colorPick { text-align: left; margin: 8px 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.sw { width: 36px; height: 36px; min-width: 0; min-height: 0; padding: 0; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.sw.on { box-shadow: 0 0 0 3px #222; }

/* スマホ */
#stick, #btns { display: none; }
body.touch #stick { display: block; position: absolute; left: calc(env(safe-area-inset-left) + 22px); bottom: calc(env(safe-area-inset-bottom) + 22px);
  width: 132px; height: 132px; border-radius: 50%; background: rgba(255,255,255,.22); border: 3px solid rgba(255,255,255,.55); pointer-events: auto; touch-action: none; }
#knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px; border-radius: 50%; background: rgba(255,255,255,.85); }
body.touch #btns { display: flex; position: absolute; right: calc(env(safe-area-inset-right) + 14px); bottom: calc(env(safe-area-inset-bottom) + 18px);
  flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: auto; }
.b { background: rgba(255,255,255,.9); font-size: .82em; line-height: 1.15; min-width: 74px; min-height: 52px; touch-action: none; }
.b.big { background: var(--green); color: #fff; min-width: 96px; min-height: 96px; border-radius: 50%; font-size: 1.05em; }
.b.on { filter: brightness(.85); }
#runBtn { display: none; }
body.touch #runBtn { display: block; position: absolute; left: calc(env(safe-area-inset-left) + 40px); bottom: calc(env(safe-area-inset-bottom) + 168px);
  pointer-events: auto; min-width: 96px; min-height: 44px; border-radius: 22px; }
body.touch #runBtn.on { background: var(--green); color: #fff; filter: none; }
body.placing #runBtn { display: none !important; }
body.touch #cross { display: block; }
body.touch #lockHint { display: none !important; }
body.touch #hold { bottom: calc(env(safe-area-inset-bottom) + 170px); }
#placeBar { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 14px); transform: translateX(-50%); display: flex; gap: 8px;
  align-items: center; background: rgba(255,250,240,.95); padding: 8px 10px; border-radius: 16px; pointer-events: auto; flex-wrap: wrap; justify-content: center; }
#placeBar .b.big { min-width: 92px; min-height: 52px; border-radius: 12px; }
#placeName { font-weight: 900; }
body.placing #btns { display: none; }

/* パソコン */
.pcHead { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.pcHead b { font-size: 1.15em; }
.pcHead .x { margin-left: auto; padding: 6px 14px; }
#pcBody { flex: 1; min-height: 0; padding-right: 4px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 10px; }
.card { background: #fff; border-radius: 14px; padding: 10px; border: 2px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.card.lock { opacity: .55; }
.card .nm { font-weight: 900; }
.card .ic { font-size: 1.6em; }
.card .mt { font-size: .82em; color: var(--sub); }
.card .pr { font-weight: 900; color: #1f3e7a; }
.card .act { display: flex; gap: 6px; align-items: center; margin-top: auto; }
.card .act button { padding: 6px 10px; flex: 1; }
.card .act .q { min-width: 2em; text-align: center; font-weight: 900; }
.card.owned { border-color: var(--green); }
.cart { display: flex; gap: 10px; align-items: center; padding-top: 10px; border-top: 2px dashed var(--line); margin-top: 8px; flex-wrap: wrap; }
.cart:empty { display: none; }
.cart .sum { font-weight: 900; flex: 1; }
.ptable { width: 100%; border-collapse: collapse; font-size: .92em; }
.ptable td, .ptable th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.ptable td:first-child, .ptable th:first-child { text-align: left; white-space: normal; }
.ptable input { width: 5.5em; padding: 4px 6px; text-align: right; }
.up { color: #b22a1c; } .down { color: var(--blue); }
.sect { font-weight: 900; margin: 14px 0 6px; color: var(--green-d); }

/* 値段・お会計 */
.prInfo, .payNums { display: flex; gap: 10px; justify-content: center; margin: 6px 0 12px; flex-wrap: wrap; }
.prInfo div, .payNums div { background: #fff; border-radius: 12px; padding: 8px 12px; font-size: .85em; color: var(--sub); min-width: 96px; }
.prInfo b, .payNums b { display: block; font-size: 1.35em; color: var(--ink); }
.payNums b.hot { color: #d42c1f; }
.prEdit { display: flex; gap: 4px; align-items: center; justify-content: center; }
.prEdit button { padding: 8px 4px; min-width: 40px; font-size: .78em; white-space: nowrap; }
.prEdit { flex-wrap: nowrap; }
.prEdit input { width: 6em; text-align: center; font-size: 1.3em; font-weight: 900; }
.give { font-weight: 900; margin: 6px 0; }
.money-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.money-grid button { padding: 10px 4px; font-weight: 900; }
.money-grid .bill { background: #e6f4e6; color: #223a60; }
.money-grid .coin { background: #fff3d1; color: #8a5a00; border-radius: 99px; }
.cardScreen { background: #10261c; color: #6d9cff; font-size: 1.8em; font-weight: 900; padding: 10px; border-radius: 12px; margin: 6px 0; text-align: right; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pad button { padding: 12px 4px; font-size: 1.15em; }
table.sum { width: 100%; border-collapse: collapse; margin: 8px 0; }
table.sum td { padding: 7px 6px; border-bottom: 1px solid var(--line); }
table.sum td:first-child { text-align: left; }
table.sum td:last-child { text-align: right; font-weight: 900; }
img.pi { width: 30px; height: 30px; vertical-align: middle; object-fit: contain; }
.card .nm img.pi { width: 40px; height: 40px; }
h2 img.pi { width: 44px; height: 44px; }
table.sum tr.total td { font-size: 1.2em; border-top: 3px solid var(--green); }

@media (max-width: 560px) {
  :root { --fs: 15px; }
  .logo { font-size: 2.1em; }
  .chip { font-size: .8em; padding: 4px 8px; }
  #guide { top: 104px; right: 8px; left: 8px; width: auto; font-size: .92em; }
  #toasts { top: 250px; }
  .panel.wide { padding: 10px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
body.cursorMode #cross { display: none; }
body.cursorMode #prompt { transform: translateX(-50%); }
#prompt b { margin-right: 4px; }
#prompt .k { display: inline-block; background: #ffd34d; color: #3a2a00; border-radius: 6px; padding: 0 6px; margin: 0 3px 0 8px; font-size: .85em; font-weight: 900; }
.card .pr small { font-size: .75em; color: var(--sub); }
.card .icons { display: flex; flex-wrap: wrap; gap: 2px; }
.card .icons img.pi { width: 28px; height: 28px; }
#guide { pointer-events: none; }
#guide #guideSkip { pointer-events: auto; }
@media (max-height: 520px) and (min-width: 561px) {
  #guide { right: auto; left: 50%; transform: translateX(-50%); top: 84px; width: min(360px, 46vw); padding: 6px 10px; font-size: .9em; }
  #guide .who { display: none; }
  #toasts { max-width: 26vw; top: 84px; }
  .toast { font-size: .8em; }
}
@media (max-height: 520px) {
  .panel { padding: 12px 14px; }
  .panel h2 { margin-bottom: 6px; font-size: 1.15em; }
  #payDlg .panel { display: grid; grid-template-columns: 1fr 1.25fr; column-gap: 14px; width: min(760px, 100%); align-content: start; }
  #payDlg h2, #payDlg .payNums, #payDlg #payMsg, #payDlg .panel > .row { grid-column: 1; }
  #payDlg #payCash, #payDlg #payCard { grid-column: 2; grid-row: 1 / span 4; }
  #payDlg .payNums { flex-direction: column; gap: 6px; margin: 4px 0; }
  #payDlg .payNums div { padding: 4px 10px; }
  #payDlg .mini { margin: 2px 0; }
  .money-grid { gap: 6px; }
  .money-grid button, .pad button { padding: 7px 4px; }
  #payDlg .row { margin: 6px 0; }
  .cardScreen { font-size: 1.4em; padding: 6px; }
  #priceDlg .panel { width: min(560px, 100%); }
  .prInfo { margin: 2px 0 6px; } .prInfo div { padding: 4px 10px; }
  #priceDlg .row { margin: 6px 0; }
  table.sum td { padding: 3px 6px; font-size: .9em; }
  #daySum .panel { width: min(560px, 100%); }
  #dsNote { margin: 4px 0; }
}
@media (max-height: 520px) {
  #payDlg .panel { padding: 8px 12px; max-height: 100%; }
  #payDlg h2 { font-size: 1em; }
  #payDlg .give { margin: 2px 0; }
  .money-grid button, .pad button { padding: 6px 4px; }
}
@media (max-height: 520px) {
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .card { padding: 6px 8px; gap: 2px; }
}
.row button.on { background: var(--green); color: #fff; }

/* 画面の上から絵を見せ、操作をそのすぐ下にまとめる。 */
#title { flex-direction:column; gap:0; padding:0 0 max(56px,env(safe-area-inset-bottom)); overflow:auto; background:#fffaf0; justify-content:flex-start; }
#title.on { display:grid; grid-template-columns:minmax(0,1fr); justify-content:stretch; grid-template-rows:minmax(120px,1fr) auto; align-items:stretch; }
#title .titleVisual { display:block; min-height:0; width:100%; overflow:hidden; }
#title .titleArtwork { display:block; width:100%; height:100%; max-height:none; object-fit:cover; object-position:center; border-radius:0; }
#title .panel { position:relative; z-index:1; width:min(640px,calc(100% - 24px)); padding:14px 16px; margin:-16px auto 0; max-height:none; overflow:visible; border:1px solid #e4d8bd; border-radius:22px; box-shadow:0 5px 20px #17323e20; }
#title .col { flex-direction:row; justify-content:center; max-width:none; gap:8px; margin:8px auto 12px; }
#title .col button { flex:1; max-width:260px; min-height:48px; }
#title .row { margin:8px 0; }
#title .row button { min-height:44px; }
#title .who { margin:5px 0; font-size:.92em; }
#title .note { margin:4px 0; }
#title .note:empty { display:none; }
#title .titleIntro { font-size:.8em; margin:0 0 5px; color:#36455a; }
#title .guideLink,#title .aboutLink { font-size:.85em; color:#224f78; }
.titleAccessible { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
#loading .logo { font-size:clamp(1.4rem,5vw,2.3rem); }
@media(max-width:767px) and (orientation:portrait) {
  #title .titleArtwork { object-position:center top; }
}
@media(min-width:900px),(orientation:landscape) and (max-height:600px) {
  #title.on { grid-template-columns:minmax(0,1fr) minmax(280px,38%); grid-template-rows:minmax(0,1fr); align-items:center; padding:16px 16px 56px; gap:16px; }
  #title .titleVisual { height:100%; }
  #title .titleArtwork { object-fit:contain; }
  #title .panel { width:100%; margin:0; padding:16px; }
  #title .col { flex-wrap:wrap; }
}
@media(max-width:360px) { #title .panel { padding:10px; } #title button { font-size:.9em; padding:10px; } }

.staffPortrait { display:block; width:96px; height:96px; max-width:100%; object-fit:contain; margin:0 auto; }

.noScriptIntro{position:relative;z-index:30;background:#fffaf0;padding:24px;max-width:720px;margin:24px auto}

.inventoryTable{overflow-x:auto;-webkit-overflow-scrolling:touch}.inventoryTable table{min-width:760px}.inventoryTable th,.inventoryTable td{white-space:nowrap}.inventoryTable td:first-child{white-space:normal;min-width:130px}

.saveCard{background:#fff;border:2px solid var(--line);border-radius:12px;padding:12px;margin:8px 0}.saveCard.current{border-color:var(--green)}.saveCard p{margin:4px 0}.saveCard .row{margin:8px 0 0}#saveSlotList{flex:1;min-height:0}#saveSlotMsg{margin:8px 0 0;flex:none}

/* 家具移動は上からの配置画面。歩行ボタンや案内を重ねない。 */
body.placing #stick,body.placing #guide,body.placing #arrow,body.placing #hold,body.placing #cross,body.placing #prompt,body.placing #lockHint { display:none!important; }
body.placing #placeBar { width:min(540px,calc(100% - 16px)); padding:10px; gap:5px; bottom:max(8px,env(safe-area-inset-bottom)); }
.placeHeading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; width:100%; gap:4px; }
#placeStatus { width:100%; min-height:2.5em; font-size:.85em; color:#b22a1c; font-weight:700; display:flex; align-items:center; justify-content:center; text-align:center; }
#placeStatus.ok { color:#224f78; }
.placeAdjust,.placeActions { display:flex; justify-content:center; flex-wrap:wrap; gap:5px; width:100%; }
.placeAdjust button { min-width:40px; min-height:44px; padding:8px; }
.placeActions button { min-height:44px; padding:10px 16px; }
@media(max-height:450px) {body.placing #placeBar {width:min(540px,calc(100% - 16px));padding:6px;gap:3px;} .placeHeading .mini{display:none;} #placeStatus{min-height:1.5em;} .placeAdjust button{min-height:36px;padding:5px 8px;} .placeActions button,#placeBar .b.big{min-height:40px;padding:7px 12px;} }

/* レジのお客さんの言葉は、視線にかかわらず読める位置に。 */
.customerSpeech { color:#243b30; background:#fffaf0; border:2px solid #2f6e9e; border-radius:14px; padding:10px 14px; font-weight:800; line-height:1.5; overflow-wrap:anywhere; }
.customerSpeech small { display:block; color:#284f73; font-size:.78em; margin-bottom:2px; }
#customerSpeech { position:absolute; left:50%; transform:translateX(-50%); width:min(440px,calc(100% - 24px)); box-sizing:border-box; pointer-events:none; box-shadow:0 3px 12px #0002; }
#paySpeech { margin:0 0 12px; }
body.customerTalking #guide,body.placing #customerSpeech { display:none!important; }
@media(max-height:500px) { #customerSpeech { left:12px; transform:none; width:min(360px,48vw); padding:5px 10px; font-size:.88em; } }

.decorChoices{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}.decorChoices button{border:2px solid transparent;font-size:.9em}.decorChoices button.sel{border-color:var(--green);background:#e2f5e8;color:#173d67}

.rankChoose select{display:block;width:100%;font:inherit;background:#fff;color:var(--ink);padding:10px;border:2px solid var(--line);border-radius:12px;margin-top:6px}#rank .panel{width:min(560px,100%)}#rank .list .v{white-space:nowrap;font-variant-numeric:tabular-nums}#rank .list .s{min-width:0;overflow-wrap:anywhere}

.salesChoose select{display:block;width:100%;font:inherit;padding:10px;border:2px solid var(--line);border-radius:12px;background:white;margin:6px 0 12px}.salesCards{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}.salesCards>div{background:#fff;border-radius:12px;padding:10px;min-width:0}.salesCards span{display:block;font-size:.85em}.salesCards strong{display:block;font-size:1.2em;overflow-wrap:anywhere}.salesProducts{width:100%;table-layout:fixed}.salesProducts th:first-child{width:45%}.salesProducts td{overflow-wrap:anywhere}.salesProducts th,.salesProducts td{padding:8px 4px}.salesProducts td:not(:first-child){text-align:right}#salesBody{min-height:0;overflow:auto}#salesHistory details{margin:12px 0}#salesHistory .row{justify-content:space-between;flex-shrink:0}#pause .panel{overflow-y:auto}

.floorThumb{display:block;width:100%;height:50px;object-fit:cover;border-radius:7px;margin-bottom:6px}.decorChoices [data-decor="floor"]{min-width:115px;max-width:46%;flex:1 1 115px;overflow-wrap:anywhere}

.orderFilters{gap:8px;margin-bottom:10px}.orderFilters input,.orderFilters select{min-width:0;flex:1 1 140px;max-width:100%;font:inherit;padding:8px;border-radius:10px;border:1px solid #ccc;background:#fff;color:#263b36}

.staffDress{border-top:1px solid var(--line);margin-top:18px;padding-top:12px}.staffDress select{font:inherit;max-width:100%;padding:8px;border:1px solid var(--line);border-radius:8px;margin:6px}.staffDress .swatches{gap:5px}.staffDress .sw{width:30px;height:30px}.decorChoices button .floorThumb{display:block;width:100%;height:64px;object-fit:cover}

.signPreview{display:block;width:min(100%,540px);height:auto;margin:16px auto;border-radius:8px;box-shadow:0 3px 12px #0002}.decorChoices button[aria-pressed="true"]{outline:2px solid var(--green);background:#e1f6e9}

.productCards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:12px;width:100%;min-width:0}.productCard{min-width:0;padding:14px;background:white;border:1px solid var(--line);border-radius:16px}.productCard header{display:flex;gap:9px;align-items:center;margin-bottom:10px}.productCard header b{flex:1;min-width:0;overflow-wrap:anywhere}.productCard header img{width:38px;height:38px;object-fit:contain}.productCard header button{font-size:.8em;padding:8px}.productMetrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0}.productMetrics>div{background:#f0f6f4;padding:8px 6px;border-radius:9px;min-width:0;text-align:center}.productMetrics dt{font-size:.72em;color:#536470;overflow-wrap:anywhere}.productMetrics dd{margin:3px 0 0;font-size:1em;font-weight:800;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.priceEdit{display:flex;align-items:center;gap:12px}.priceEdit input{width:120px;max-width:65%}.recurringCosts{margin:14px 0;padding:12px;background:#edf4f4;border-radius:12px;font-size:.9em}.complaintDetails{margin:16px 0;padding:12px;background:#fff0df;border-radius:12px}.complaintDetails ul{padding:0;list-style:none}.complaintDetails li{display:flex;flex-wrap:wrap;gap:6px;padding:7px 0;border-bottom:1px solid #e7d6bd}.complaintDetails strong{margin-left:auto}#productDetail .panel{width:min(500px,100%)}#productDetail .pcHead img{width:38px;height:38px;vertical-align:middle}#costReceipt{position:fixed;z-index:110;left:50%;top:50%;transform:translate(-50%,-50%);display:none;width:min(420px,calc(100% - 32px));background:#102f43f5;color:white;border:2px solid #63b6df;border-radius:22px;padding:24px;text-align:center;box-shadow:0 16px 60px #0006;pointer-events:none}#costReceipt.on{display:block}#costReceipt>strong{display:block;font-size:2.2em;color:#ffdb7a;margin:10px 0}#costReceipt .productMetrics>div{background:#ffffff12}#costReceipt dt{color:#b9d7de}#salesBody,#pcBody{min-width:0;overflow-x:hidden}#salesBody .salesProducts{min-width:0}#productDetail .productMetrics{gap:6px}#productDetail .productMetrics>div{padding:8px 4px}

.orderFilters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.orderFilters input{grid-column:1/-1;max-width:none;min-width:0}.orderFilters select{width:100%;min-width:0;font-size:.85em;padding:8px;border:1px solid var(--line);border-radius:10px;background:#fff}@media(min-width:700px){.orderFilters{grid-template-columns:1fr 1fr 1fr}.orderFilters input{grid-column:auto}}

.branchPanel{border-bottom:3px solid #d4dfd5;padding-bottom:24px;margin-bottom:24px}.branchPlots{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:16px;margin-top:16px}.branchPlot{background:#fff;border:2px solid #d6e4dd;border-radius:20px;padding:16px;min-width:0}.branchPlot h3{margin:12px 0 4px}.branchPlot p{font-size:.85em}.branchPlot button{width:100%;font-size:.85em;margin-top:8px;white-space:normal}.plotScene{height:100px;background:linear-gradient(#b9e4ed 65%,#a68bcc 65%);border-radius:12px;display:flex;align-items:end;justify-content:space-around;font-size:30px;padding:10px}.plotScene strong{font-size:50px}.river .plotScene{background:linear-gradient(#b9e4ed 55%,#65b7d1 55%,#65b7d1 80%,#a68bcc 80%)}.station .plotScene{background:linear-gradient(#c7d9ed 65%,#c4c7cb 65%)}.branchPlot dl{display:grid;grid-template-columns:minmax(0,1fr) auto;font-size:.8em;gap:8px}.branchPlot dt,.branchPlot dd{margin:0;overflow-wrap:anywhere}.plotConfirm{background:#fff4d4;padding:12px;border-radius:12px;margin-top:12px}

.packPreview{display:flex;gap:6px;margin:10px 0}.packPreview img{width:30%;height:54px;object-fit:cover;border-radius:7px}.branchPlot select{width:100%;min-width:0;font-size:.85em}.storeStatus{background:#f0f7f3;border-radius:12px;padding:10px;margin-top:12px}.coast .plotScene{background:linear-gradient(#b4e3ef 50%,#58bfd0 50%,#e4d8ae 85%)}.farm .plotScene{background:linear-gradient(#c6e4e6 55%,#9b67bf 55%,#c4a46c)}.hill .plotScene{background:linear-gradient(#b9d9ea 60%,#6e7d98 60%)}

.investmentCards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:16px}.investmentCard{min-width:0}.investmentCard input{width:100%;box-sizing:border-box}.investmentCard .row button{flex:1;min-width:0;font-size:.85em;white-space:normal}.shareChart svg{width:100%;height:100px;display:block}.shareChart small{font-size:.75em;color:#61716a}.investmentOrder{display:flex;align-items:center;flex-wrap:wrap;gap:8px;border-bottom:1px solid #dce4df;padding:10px 0}.investmentOrder span{font-size:.8em}.investmentOrder button{font-size:.8em}.investmentNews{padding:12px;background:#edf5f0;border-radius:14px;margin:14px 0}.investmentCard details{margin-top:12px}

.investmentFilters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0}.investmentFilters label{min-width:0}.investmentFilters select{width:100%;min-width:0;font-size:14px;padding:10px}.investmentMarket,.investmentSectors{display:flex;flex-wrap:wrap;gap:10px}.investmentMarket{padding:14px;background:#e4f3ed;border-radius:14px}.investmentSectors{margin-bottom:16px}.investmentSectors>div{flex:1;min-width:130px;padding:12px;background:#eaf0f8;border-radius:12px;display:grid;gap:5px}.investmentCardHead{display:flex;justify-content:space-between;align-items:start;gap:8px}.investmentCardHead button{padding:8px 14px;flex-shrink:0}.investmentDesk details{margin:12px 0}.investmentDesk summary{cursor:pointer;font-weight:bold}.investmentDesk .investmentCard{min-width:0}.investmentDesk .productMetrics{overflow-wrap:anywhere}.investmentDesk .shareChart small{overflow-wrap:anywhere}@media(max-width:480px){.investmentFilters{grid-template-columns:minmax(0,1fr)}.investmentDesk .investmentOrder{grid-template-columns:minmax(0,1fr)}.investmentDesk .row button{white-space:normal}}

.investmentGoals{display:grid;gap:8px;margin:12px 0}.investmentGoals>div{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;background:#edf5f1;padding:12px;border-radius:10px}.investmentDesk .productMetrics{grid-template-columns:repeat(2,minmax(0,1fr))}

:root{--green:#2869b4;--green2:#1b4b85}button.big,.chip.open{background:#2869b4}.viTitleScene{background:linear-gradient(90deg,#102c55ee,#214b7a55);display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:7vw;color:#fff;pointer-events:none}.viTitleBrand{font:clamp(70px,10vw,150px)/.9 Georgia;letter-spacing:-4px}.viTitleBrand em{color:#e7c77c}.viTitleScene p{letter-spacing:3px;font-size:18px}#title .titleAccessible{position:static;width:auto;height:auto;clip:auto;font-size:22px}#btnRank,#pRank,#pNature,#pEffects,#accSetMail,#accClearMail,#accSetPw,#accDelete,#accPw,#accMail,#accNewPw{display:none!important}#viCardsButton{position:fixed;right:16px;bottom:190px;z-index:8;background:#205ba4;color:#fff;border:1px solid #83b5f4;padding:10px;border-radius:8px}#viCardsOverlay{position:fixed;inset:0;background:#102744aa;z-index:100;overflow:auto;padding:4vh 4vw}#viCardsOverlay>.viPanel{max-width:960px;margin:auto;background:#f2f6fd;color:#163455;padding:24px;border-radius:15px}.viGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(115px,1fr));gap:14px}.viGrid img{width:100%;border-radius:6px}.viGrid p{font-size:12px}.viOpenRow{padding:12px;border-bottom:1px solid #bdcce0}.viFoil{box-shadow:0 0 20px #b49be9}#viCardsOverlay button{padding:10px;margin:4px}@media(max-width:760px){.viTitleScene{justify-content:flex-start;padding-top:12vh}.viTitleBrand{font-size:76px}#viCardsButton{right:12px;bottom:215px;font-size:11px}.viGrid{grid-template-columns:repeat(3,1fr)}}

:root{--green-d:#1b4b85}#account label,#account hr{display:none!important}#title .panel{background:#f0f6fff2}#title .titleIntro{color:#193f73}#title .panel .titleAccessible{display:block!important;position:static!important;clip-path:none!important;overflow:visible!important}#viCardsButton{font-family:inherit}
#title .titleVisual{opacity:1!important}.viTitleScene{background:linear-gradient(90deg,#102c55e8 0%,#173d7155 55%,transparent 100%)}#title .panel{margin-left:auto;margin-right:5vw;width:min(400px,90vw)}@media(max-width:760px){#title .panel{margin:auto auto 4vh}.viTitleScene{padding:6vh 7vw}.viTitleScene p{font-size:12px}}
.viQuickTools{display:flex;gap:5px}.viQuickTools button{padding:6px 11px;font:inherit;font-size:12px;background:#edf5ff;color:#194d86;border:1px solid #8db2df;border-radius:16px}#title .col .big{background:#2869b4}#title .col .alt{background:#edc774;color:#173c68}@media(max-width:600px){.viQuickTools button{font-size:10px;padding:5px 7px}#hShop{max-width:110px;overflow:hidden;text-overflow:ellipsis}}