/* SLOT PORTAL 2.5 — calm twilight / subtle tabby visual layer. No persistence logic. */
:root{--tw-navy:#102746;--tw-deep:#091c35;--tw-peach:#ffe5dd;--tw-blue:#e5f0ff;--tw-lavender:#e9e2ff;--tw-ink:#233251;--tw-gold:#ffd59b;--tw-radius:21px}
html,body,button,input,textarea,select{font-family:'Hiragino Maru Gothic ProN','Hiragino Sans','Yu Gothic',-apple-system,BlinkMacSystemFont,sans-serif!important}
button,a{-webkit-tap-highlight-color:transparent}
/* Portal */
html:has(body.tw-portal){background:#0b203c}
body.tw-portal{color:#fff6f0;background:linear-gradient(180deg,#132b4c 0%,#142844 58%,#0e203a 100%);min-height:100dvh}
.tw-portal .ambient{position:fixed;inset:0;z-index:0;background:linear-gradient(180deg,rgba(10,22,43,.12),rgba(10,21,37,.37) 63%,rgba(10,24,43,.8)),url('./twilight-scene-v25.webp') center 52%/cover no-repeat;filter:none;opacity:.94}
.tw-portal .ambient::after{display:none}
.tw-portal .shell{position:relative;z-index:1;width:min(100%,510px);padding:calc(12px + env(safe-area-inset-top,0px)) 17px calc(110px + env(safe-area-inset-bottom,0px));animation:tw-enter .4s ease both}
.tw-portal .hero{height:249px;aspect-ratio:auto;min-height:0;margin:0 -17px 15px;background:linear-gradient(180deg,rgba(10,25,46,.04) 0%,rgba(12,25,47,.1) 58%,rgba(11,24,42,.75) 100%),url('./twilight-hero-v25.webp') center / cover no-repeat;display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;text-align:left;border-radius:0 0 28px 28px;overflow:hidden;box-shadow:0 16px 32px #06142e50}
.tw-portal .hero::before,.tw-portal .hero::after{display:none}
.tw-portal .hero .hero-halo,.tw-portal .hero .crown,.tw-portal .hero .laurel,.tw-portal .hero .spark,.tw-portal .hero .hero-shine{display:none}
.tw-portal .hero-main{display:flex;flex-direction:column;align-items:flex-start;gap:0;margin:34px 0 0 24px;z-index:2;max-width:70%}
.tw-portal .hero-crown{color:#ffe2b3;font-size:36px;line-height:1;margin-bottom:7px;filter:drop-shadow(0 2px 5px #07162e35)}
.tw-portal .hero h1.brand{position:relative!important;clip-path:none!important;width:auto!important;height:auto!important;overflow:visible!important;margin:0!important;max-width:none!important;white-space:normal!important;display:block;font-family:'Arial Rounded MT Bold','Hiragino Maru Gothic ProN','Hiragino Sans',sans-serif!important;font-size:clamp(25px,7.7vw,36px)!important;line-height:1.02!important;letter-spacing:.005em!important;font-weight:950;color:#fff8f1!important;background:none!important;-webkit-text-fill-color:initial!important;filter:drop-shadow(0 2px 4px #10233b88)!important}
.tw-portal .hero .brand span{display:block;letter-spacing:0}
.tw-portal .hero-settings{position:absolute;top:15px;right:17px;width:43px;height:43px;border:1px solid #fff9e87a;border-radius:15px;color:#fff5e4;background:#14253f75;backdrop-filter:blur(9px);font-size:19px;z-index:5;display:grid;place-items:center}
.tw-portal .nav-cards{display:grid;grid-template-columns:1fr;gap:13px;margin:0}
.tw-portal .feature{position:relative;display:block;height:117px;aspect-ratio:auto;border:1px solid #ffffffb7!important;border-radius:20px;background-image:none!important;background-size:auto!important;box-shadow:0 7px 20px #05163145, inset 0 1px #fffa;filter:none;overflow:hidden;transition:transform .15s ease,box-shadow .15s ease}
.tw-portal .feature::before{content:'';position:absolute;inset:0;display:block;background:radial-gradient(circle at 90% 18%,#ffffff9c 0 4px,transparent 5px),radial-gradient(circle at 87% 65%,#ffffff80 0 3px,transparent 4px),radial-gradient(ellipse at 97% 95%,#ffffff42,transparent 42%);pointer-events:none}
.tw-portal .feature::after{display:none}
.tw-portal .feature.income{background:linear-gradient(120deg,#fff1e8,#ffd8d3 70%,#ffd0cd)!important;color:#3a3545}
.tw-portal .feature.advisor{background:linear-gradient(120deg,#f0f6ff,#cde4ff 76%,#bddafc)!important;color:#253f6b}
.tw-portal .feature.judge{background:linear-gradient(120deg,#f4efff,#ded4fa 75%,#d5cdf6)!important;color:#3a365d}
.tw-portal .feature:active,.tw-portal .feature.active{transform:scale(.985)!important;filter:none!important;box-shadow:0 4px 12px #05163138}
.tw-portal .feature-body{position:absolute;inset:0!important;display:flex;align-items:center;flex-direction:row;justify-content:flex-start;padding:16px 19px;gap:17px;opacity:1!important}
.tw-portal .feature-icon{flex:none;display:grid;place-items:center;width:67px;height:67px;border-radius:21px;border:1px solid #fff8;background:#ffffff73;box-shadow:inset 0 1px #fffa,0 5px 13px #10223e17;font-size:38px;text-shadow:none;color:inherit}
.tw-portal .feature-icon svg{width:42px;height:42px;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.tw-portal .feature.income .feature-icon{color:#eb8494;background:linear-gradient(140deg,#ffebdf,#ffe2df)}
.tw-portal .feature.advisor .feature-icon{color:#5596e6;background:linear-gradient(140deg,#ebf4ff,#d7e8ff)}
.tw-portal .feature.judge .feature-icon{color:#8d80cd;background:linear-gradient(140deg,#f2edff,#e4dafa)}
.tw-portal .feature-title{display:block;color:var(--tw-ink);font-size:clamp(21px,5.5vw,26px);font-weight:950;line-height:1.3;text-shadow:none;letter-spacing:-.04em}
.tw-portal .feature-sub{display:none!important}
.tw-portal .feature .chev{display:grid;opacity:1;position:absolute;right:17px;bottom:38px;width:31px;height:40px;border:none;background:transparent;box-shadow:none;color:#526283;font-size:31px}
.tw-portal .settings{margin:19px 0 0;border:1px solid #ffffff52;border-radius:19px;background:linear-gradient(140deg,#142b4ceb,#11243fe9);box-shadow:0 8px 25px #04132c40;color:#f8f5ff;overflow:hidden}
.tw-portal .settings summary{padding:17px 19px;color:#e5edff;font-size:14px;font-weight:800}
.tw-portal .settings input[type=url]{background:#f9fbff;color:#1b3657;border:1px solid #bfd1e9;border-radius:12px}
.tw-portal .settings .goldbtn{border:none;background:linear-gradient(110deg,#b4cfff,#f2becf);color:#253956;box-shadow:none}
.tw-portal .settings .ghostbtn{border:1px solid #869bbf;background:#233a60;color:#f5f4ff;box-shadow:none}
.tw-portal .backup p,.tw-portal .status,.tw-portal .caution{color:#becde5}
.tw-portal .intro{background:linear-gradient(180deg,#0b1e3e42 0%,#10234724 56%,#091c34ae 100%),url('./twilight-scene-v25.webp') center center/cover no-repeat;cursor:pointer}
.tw-portal .intro .intro-center{margin-top:-20px;filter:none;animation:intro-pop .65s ease both}
.tw-portal .intro-crown{color:#ffe1ab;font-size:54px;font-weight:500;text-shadow:0 3px 12px #222e4866}
.tw-portal .intro-word{font-family:'Arial Rounded MT Bold','Hiragino Maru Gothic ProN','Hiragino Sans',sans-serif!important;color:#fff6ea;font-weight:950;font-size:clamp(37px,11vw,62px);line-height:1.05;text-shadow:0 3px 12px #091b37c2;letter-spacing:.015em}
.tw-portal .intro-progress{height:7px;width:min(210px,54vw);background:#253b607f;margin-top:32px;border:1px solid #f5e9db6d;border-radius:9px}
.tw-portal .intro-progress i{background:linear-gradient(90deg,#f2cba4,#fff1d7);box-shadow:none}
.tw-portal .intro-hint{display:none}
.tw-bottom-nav{position:fixed;z-index:15;bottom:0;left:0;right:0;max-width:510px;margin:auto;padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px));display:flex;justify-content:space-around;gap:2px;background:linear-gradient(180deg,#152c4ff5,#0c1d38fa);border:1px solid #ffffff2d;border-bottom:none;border-radius:22px 22px 0 0;box-shadow:0 -12px 28px #07183465;backdrop-filter:blur(15px)}
.tw-bottom-nav a,.tw-bottom-nav button{display:flex;flex:1;flex-direction:column;align-items:center;gap:4px;padding:5px 3px;background:transparent;border:none;color:#b4c5e0;min-height:49px;font-size:11px;font-weight:800;letter-spacing:0;white-space:nowrap}
.tw-bottom-nav .selected{color:#ffdda9}
.tw-bottom-nav svg{width:22px;height:22px;stroke-width:1.8;stroke:currentColor;fill:none;stroke-linecap:round;stroke-linejoin:round}
/* Machine list: actual editable machine data, always visible, no fake examples. */
html:has(body.tw-judge){background:#0b203b}
body.tw-judge{color:#f8f7ff;background:linear-gradient(180deg,#112849ed 0%,#11294be8 27%,#112c4ab4 72%,#10223bf3 100%),url('./twilight-scene-v25.webp') center bottom/cover fixed no-repeat}
.tw-judge .page{max-width:540px;padding:calc(13px + env(safe-area-inset-top,0px)) 15px calc(104px + env(safe-area-inset-bottom,0px))}
.tw-judge .top{margin-bottom:15px}
.tw-judge .top h1{font-size:clamp(19px,5.1vw,24px);font-weight:900;color:#fff7f2;text-shadow:none;letter-spacing:-.03em}
.tw-judge .headbars{color:#c3b6ff;text-shadow:none;font-size:23px}
.tw-judge .back,.tw-judge .round-btn{width:42px;height:42px;border-radius:14px;border:1px solid #f9ecdf70;background:#102a4bbb;box-shadow:none;color:#fff6ee}
.tw-judge .search{background:#fdfbff;color:#213856;border:1px solid #cbd6ea;border-radius:14px;box-shadow:0 4px 14px #0a183326}
.tw-judge .search::placeholder{color:#8994a7}
.tw-judge .sort-toggle{border:1px solid #dcd4f9;background:#eae5ff;color:#5b568b;border-radius:13px;box-shadow:none;font-weight:800}
.tw-judge .filter-pill{border:1px solid #ffffff3c;background:#213b5ddd;color:#e5ebf6;border-radius:12px;box-shadow:none}
.tw-judge .filter-pill.selected{background:#fff5e6;color:#273e61;border-color:#fff4e6;box-shadow:none}
.tw-judge .count{color:#dfd7e5;font-size:11px;margin:4px 0 13px}
.tw-judge .machine-grid{display:grid;grid-template-columns:1fr;gap:10px}
.tw-judge .machine,.tw-judge .machine:nth-child(3n+1),.tw-judge .machine:nth-child(3n+2),.tw-judge .machine:nth-child(3n){min-height:108px;position:relative;display:grid;grid-template-columns:93px minmax(0,1fr);grid-template-rows:auto auto;grid-template-areas:'cover title' 'cover actions';column-gap:11px;align-items:center;overflow:hidden;border:1px solid #fff8fa;border-radius:17px;background:#fffaf9ef;box-shadow:0 6px 16px #09142d35;color:#243956}
.tw-judge .machine figure{grid-area:cover;aspect-ratio:1/1;width:93px;height:100%;min-height:106px;background:#273b5b;border-radius:12px 0 0 12px;overflow:hidden;align-self:stretch}
.tw-judge .machine figure::after{display:none}
.tw-judge .machine-photo{height:100%;object-fit:cover}
.tw-judge .machine-name{grid-area:title;display:block;min-height:0;padding:11px 33px 0 0;margin:0;background:transparent;border:none;text-align:left;font-size:clamp(13px,3.6vw,16px);line-height:1.3;text-shadow:none;color:#253651;font-weight:900;overflow-wrap:anywhere}
.tw-judge .machine-foot{grid-area:actions;align-self:start;padding:6px 12px 9px 0;background:none}
.tw-judge .machine-link,.tw-judge .machine-link.missing{display:flex;width:100%;min-height:35px;border:1px solid #d7d1eb;background:linear-gradient(110deg,#e7e0ff,#d7e4ff);color:#495a84;border-radius:9px;box-shadow:none;font-size:12px;font-weight:900;text-shadow:none}
.tw-judge .machine-link.missing{background:#f1edf3;color:#7a6982}
.tw-judge .machine-edit{position:absolute;right:7px;top:7px;width:32px;height:31px;border:0;border-radius:10px;background:#e7e9f7;color:#52658c;font-size:20px}
.tw-judge .machine.launching{transform:scale(.985);filter:none;box-shadow:0 6px 16px #09142d35}
.tw-judge .placeholder{background:linear-gradient(125deg,#607ea0,#b3a5cc);font:900 13px 'Hiragino Sans',sans-serif;color:white;text-shadow:none}
.tw-judge .add{width:100%;min-height:49px;color:#253958;border:1px solid #fff5ee;border-radius:15px;background:linear-gradient(100deg,#ffe4db,#e4e7ff);box-shadow:0 7px 17px #0817333e;font-weight:850}
.tw-judge .backup-link{color:#ecddf2}
.tw-judge .legacy{background:#fff9e8;color:#524057;border:1px solid #ffe2b0}
.tw-judge .overlay{background:#0a193ad2;z-index:30}
.tw-judge .editor{color:#223852;border:1px solid #fff7ee;border-radius:23px;background:linear-gradient(180deg,#fff8f4,#f4f1ff);box-shadow:0 22px 65px #091733a6}
.tw-judge .editor h2,.tw-judge .editor label{color:#263958}
.tw-judge .editor input:not([type=file]),.tw-judge .editor select,.tw-judge .editor textarea{background:#fff;color:#223852;border:1px solid #b9c9e3;box-shadow:none}
.tw-judge .editor input::placeholder,.tw-judge .editor textarea::placeholder{color:#93a2b9}
.tw-judge .editor .more-fields{background:#eaf0fa;border:1px solid #cbd8ee}
.tw-judge .more-fields summary,.tw-judge .editor-head .dismiss{color:#49608a}
.tw-judge .editor-head .dismiss{background:#fff;border:1px solid #cfd8e9}
.tw-judge .image-buttons button{background:#e6ebfa;color:#374974;border:1px solid #c2cfe6}
.tw-judge .preview{background:#dde7fa;border:1px dashed #a9bddc;color:#576a8e}
.tw-judge .help,.tw-judge .edit-note{color:#64748c}
.tw-judge .editor-submit{background:linear-gradient(110deg,#c4d9ff,#f7c9d3);color:#243951;border:none;box-shadow:none}
.tw-judge .order-controls span{color:#55658a}
.tw-judge .order-controls button{background:#e7eafa;color:#526485;border:1px solid #c1cce0}
.tw-judge .filter-pills{margin-bottom:2px}
.tw-judge .tw-bottom-nav{color:#eee}
/* Income presentation: all record operations remain original. */
html:has(body.tw-income){background:#0d2241}
body.tw-income{--bg:#102440;--panel:#fff9f6;--panel2:#f6f5ff;--line:#d9dce8;--text:#273b55;--muted:#6e7991;--brand:#8b87cc;--blue:#6297dc;--red:#ec899b;--yellow:#f0bc87;--radius:19px;color:var(--text);background:linear-gradient(180deg,#102746ed 0%,#193352cb 50%,#122949d8 100%),url('./twilight-scene-v25.webp') center bottom/cover fixed no-repeat}
.tw-income .shell{width:min(100%,1100px);padding:calc(17px + env(safe-area-inset-top,0px)) 14px calc(130px + env(safe-area-inset-bottom,0px))}
.tw-income .top{padding:17px 18px;margin-bottom:17px;border:1px solid #ffffff50;border-radius:22px;background:linear-gradient(120deg,#213e65c9,#1b3457c9);box-shadow:0 7px 18px #09163355}
.tw-income .top::before{display:none}
.tw-income .brand{font-size:10px;color:#ffdcb2;border:none;background:none;padding:0;box-shadow:none;letter-spacing:.12em}
.tw-income h1{color:#fff8f2;font-size:clamp(23px,6vw,32px);text-shadow:none;letter-spacing:-.02em;margin:7px 0 0}
.tw-income .sub{color:#d5dfee;margin:0;font-size:12px;font-weight:500}
.tw-income .portal-link{background:#f9ebdf;border:1px solid #f5efef;color:#284262;box-shadow:none;white-space:nowrap;border-radius:15px}
.tw-income .card{border:1px solid #fff7ee;border-radius:21px;background:#fffaf7f5;box-shadow:0 8px 26px #08183145;padding:19px}
.tw-income .card h3{color:#344968}
.tw-income .card h3::before,.tw-income .section-head h2::before{display:none}
.tw-income .section-head h2{color:#fff7f5;text-shadow:none}
.tw-income .section-head .hint{color:#dae3f3;border:1px solid #ffffff35;background:#1d3758a6}
.tw-income label{color:#364b66}
.tw-income input,.tw-income select,.tw-income textarea{background:#fff;color:#263a56;border:1px solid #c4d3e4;box-shadow:none;border-radius:13px}
.tw-income .kpi{border:1px solid #f4dfe2;background:linear-gradient(135deg,#fff0e9,#fff8f2)}
.tw-income .kpi:nth-child(2n){background:linear-gradient(135deg,#eef3ff,#fffafd);border-color:#d6e3fb}
.tw-income .tabs{background:#142c4bef;border:1px solid #ffffff2d;border-radius:19px 19px 0 0;box-shadow:0 -9px 24px #091c3988}
.tw-income .tabs button{border:0;color:#b6c8e6;background:transparent;font-weight:800;border-radius:10px}
.tw-income .tabs button[aria-selected='true']{background:#ffd9c4;color:#264262;box-shadow:none}
.tw-income .btn.primary,.tw-income .primary,.tw-income .selectgroup button[aria-pressed='true']{background:linear-gradient(100deg,#bfd6ff,#f8c5d2);color:#293d5d;border-color:#d3dafa;box-shadow:none}
.tw-income .flash{background:#f6f7ff;color:#253b5d}
/* shared splash/transition animation: same logo/bar, no extra copy */
#slot-loading-transition{color:#fff6ed;background:linear-gradient(180deg,#0a1b3499 0%,#10294b12 54%,#081d37aa),url('./twilight-scene-v25.webp') center center/cover no-repeat}
#slot-loading-transition .slot-loading-center{filter:none;transform:scale(.95)}
#slot-loading-transition .slot-loading-crown{font-size:57px;color:#ffe1b5;text-shadow:0 2px 12px #101e3e}
#slot-loading-transition .slot-loading-word{font:950 clamp(36px,10vw,65px)/1.06 'Arial Rounded MT Bold','Hiragino Maru Gothic ProN','Hiragino Sans',sans-serif!important;color:#fff8f1;text-shadow:0 3px 16px #102441ad;letter-spacing:.015em}
#slot-loading-transition .slot-loading-progress{width:min(210px,54vw);height:7px;background:#1c3b6389;border:1px solid #fcf2ed75;margin:30px auto 0}
#slot-loading-transition .slot-loading-progress i{background:linear-gradient(90deg,#f1bfa0,#ffe6c5);height:100%;box-shadow:none}
#slot-loading-transition .slot-loading-hint{display:none}
@keyframes tw-enter{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:590px){.tw-portal .hero{height:290px}.tw-portal .feature{height:130px}.tw-judge .machine-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:355px){.tw-portal .hero{height:219px}.tw-portal .feature{height:104px}.tw-portal .feature-icon{width:59px;height:59px}.tw-portal .feature-title{font-size:19px}.tw-portal .feature-body{padding:10px 12px;gap:10px}.tw-judge .machine figure{width:79px}.tw-judge .machine{grid-template-columns:79px minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.tw-portal .shell{animation:none!important}}

.tw-portal .feature.advisor .feature-title{font-size:clamp(17px,4.8vw,20px);white-space:nowrap}
.tw-portal .feature.judge .feature-title{font-size:clamp(18px,5vw,22px);white-space:nowrap}
.tw-income .callout{position:relative;overflow:hidden;border:1px solid #e5cee6;border-radius:20px;background:linear-gradient(125deg,#f4e8ff,#fee6e3);box-shadow:none}
.tw-income .callout::before{display:none}
.tw-income .callout .label{color:#685f89}
.tw-income .callout .number{color:#324d79;text-shadow:none}
.tw-income .callout small{color:#81778a}
.tw-income .callout::after{display:none}
.tw-income .kpi,.tw-income .record{background:linear-gradient(135deg,#fff1e9,#f9f4ff);border:1px solid #eadbe8;color:#29415e;box-shadow:none}
.tw-income .kpi span{color:#566985}
.tw-income .card .inline-help{color:#596f8e}
.tw-income .selectgroup button{background:#f5f0fb;color:#4f6187;border:1px solid #d8d6e9}
/* Keep the existing income bottom navigation fixed to the viewport.
   A legacy forwards animation on .shell established a containing block for fixed tabs. */
.tw-income .shell{animation:none!important;transform:none!important}
.tw-income .tabs{box-shadow:0 -9px 26px #06172c78;border-top:1px solid #ffffff38!important;gap:5px!important;padding:8px 7px calc(10px + env(safe-area-inset-bottom,0px))!important}
.tw-income .tabs button{box-shadow:none!important;border:0!important;border-radius:12px!important;min-height:45px;background:transparent!important;color:#c0d1ea!important}
.tw-income .tabs button[aria-selected='true']{background:#ffe1d0!important;color:#233b5c!important;box-shadow:none!important}
