@import url('/style.css');
:root{--ink:#2c4271;--muted:#7183a5;--blue:#5b85d2;--line:rgba(71,105,158,.16);--cream:#fff2df;--paper:rgba(255,255,255,.75)}
*{box-sizing:border-box}body{margin:0;min-width:300px;color:var(--ink);background:linear-gradient(140deg,#d9f7ff 0%,#eff5fc 40%,#fff6e9 72%,#f4c5d3 100%);font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;min-height:100dvh}
button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #5b85d2;outline-offset:4px}[hidden]{display:none!important}
.ambient{position:fixed;pointer-events:none;z-index:-1;border-radius:50%;filter:blur(30px)}.ambient-blue{width:45vw;height:45vw;background:#a8eaff88;left:-18vw;top:5vh}.ambient-pink{width:40vw;height:40vw;background:#f3a8b344;right:-20vw;bottom:5vh}
.topbar{max-width:1376px;margin:auto;padding:22px 32px;display:flex;align-items:center;justify-content:space-between;gap:12px}.home-link,.account-link{display:flex;align-items:center;gap:10px;border:1px solid rgba(255,255,255,.75);border-radius:999px;background:#ffffff80;padding:12px 18px;font-size:13px;font-weight:700;min-height:44px;backdrop-filter:blur(18px)}.edition{font-size:10px;letter-spacing:.2em;font-weight:700;color:#6e83a5}
main{max-width:1240px;margin:auto;padding:30px 32px 40px}.loading-card{min-height:50vh;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--muted)}.loading-dot{width:8px;height:8px;border-radius:50%;background:#5b85d2;box-shadow:0 0 0 7px #5b85d21a}
.lobby{display:grid;grid-template-columns:1.1fr .9fr;column-gap:8%;row-gap:56px;align-items:center;padding-top:25px}.eyebrow{font-size:10px;letter-spacing:.18em;font-weight:750;color:#6d87af}.lobby-story h1{display:flex;align-items:center;gap:16px;font-size:clamp(38px,5vw,62px);letter-spacing:-.055em;line-height:1.16;margin:18px 0}.title-icon{font-size:1.3em;font-family:"Segoe UI Symbol","DejaVu Sans",serif;text-shadow:0 8px 14px #5b85d230}.title-period{color:#e8a6bb;margin-left:-12px}.tagline{font-size:16px;letter-spacing:.12em;color:#6f83a4;margin:0 0 28px 4px}
.hero-board{height:260px;position:relative;margin:0 20px 10px 0;perspective:600px}.hero-board-grid{position:absolute;inset:16px 16px 12px 15px;border-radius:24px;background:conic-gradient(#abc6e088 25%,#fff8ee 0 50%,#abc6e088 0 75%,#fff8ee 0) 0 0/60px 60px;transform:rotateX(24deg) rotateZ(-10deg);box-shadow:0 30px 40px #5b85d221;border:8px solid #ffffffaa}.hero-piece{position:absolute;font-family:"Segoe UI Symbol","DejaVu Sans",serif;font-size:180px;line-height:1;text-shadow:0 22px 20px #2c427129}.hero-white{color:#fffdf5;left:10%;top:0;-webkit-text-stroke:1px #889fbb}.hero-black{color:#385a94;right:12%;top:35px}.hero-note{position:absolute;right:0;bottom:0;font-size:10px;font-weight:800;letter-spacing:.2em;background:#fff9ec;border:1px solid white;border-radius:20px;padding:12px 20px;transform:rotate(-7deg);box-shadow:0 8px 20px #2c427114}
.game-notes{display:flex;flex-wrap:wrap;gap:14px;margin:22px 0 0;font-size:11px;color:#788aaa}.game-notes span:before{content:"✧";margin-right:6px;color:#719bd8}
.entry-card{padding:32px;border:1px solid #fff;border-radius:28px;background:linear-gradient(130deg,#ffffffc9,#f7fbff99 70%,#f5c8d433);box-shadow:0 24px 60px #42649414;backdrop-filter:blur(12px)}.card-heading{display:flex;align-items:center;gap:10px;font-size:12px;margin-bottom:26px;color:#7c8da7}.tiny-star{font-size:22px;color:#82a6d1}.primary{border:1px solid #7896c4;background:linear-gradient(115deg,#7fa6e1,#38578c);color:white;border-radius:16px;min-height:50px;font-weight:700;padding:12px 18px;box-shadow:0 9px 18px #5b85d21a}.create-button{width:100%;font-size:19px;letter-spacing:.12em;min-height:65px}.resume-link{display:block;text-align:center;font-size:12px;color:#597eb4;padding-top:18px}.divider{display:flex;align-items:center;gap:12px;margin:28px 0 20px;font-size:11px;color:#8999af}.divider:before,.divider:after{content:"";height:1px;background:linear-gradient(90deg,transparent,#b7c7db);flex:1}.divider:after{transform:rotate(180deg)}
.join-form{display:flex;align-items:center;gap:10px;border:1px solid #afc1d4aa;border-radius:16px;background:#ffffffb3;padding:8px 8px 8px 16px}.hash{font-size:24px;color:#8ca1bb}.join-form input{min-width:0;width:100%;border:0;outline:0;background:transparent;color:var(--ink);font-size:16px;letter-spacing:.08em;height:44px}.join-form input::placeholder{font-size:13px;letter-spacing:.02em;color:#9ba9ba}.join-button{height:44px;min-width:48px;border:0;border-radius:12px;background:#e2ecfa;color:#4c72ab;font-size:25px}.entry-help{font-size:11px;text-align:center;color:#8a99ad;margin:20px 0 0}
.rules-card{margin-top:16px;border:1px solid #fff9;border-radius:18px;background:#ffffff48;padding:0 22px;font-size:12px;color:#6f84a3}.rules-card summary{list-style:none;display:flex;justify-content:space-between;cursor:pointer;padding:18px 0;font-weight:650}.rules-card p{line-height:1.9}.rules-card ul{padding-left:20px;line-height:1.8}
.rooms-section{grid-column:1/-1;margin-top:4px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.section-heading h2{font-size:17px;letter-spacing:-.02em}.section-heading h2 span{display:inline-block;margin-left:9px;font-size:11px;background:#ffffff89;padding:5px 9px;border-radius:12px;color:#7f93af}.text-button{border:0;background:transparent;color:#7290b8;padding:10px 2px;font-size:12px;min-height:40px}.room-list{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:10px}.room-empty{grid-column:1/-1;color:#899ab2;border:1px dashed #afc5dd;border-radius:18px;text-align:center;padding:32px;font-size:12px}.room-card{border:1px solid #fff;border-radius:18px;background:#ffffff70;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:20px;min-width:0}.room-card strong{display:block;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:180px}.room-card p{font-size:11px;color:#8b9ab0;margin:8px 0 0}.room-card button{border:0;background:#e1ebf9;border-radius:12px;padding:11px 14px;font-size:11px;color:#5577a8;flex-shrink:0}
.table-view{max-width:1120px;margin:auto}.table-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 24px}.table-heading h1{font-size:28px;margin:6px 0 0;letter-spacing:-.03em}.room-link-button{border:1px solid #fff;background:#ffffff8a;border-radius:16px;display:flex;gap:20px;align-items:center;padding:13px 18px;color:var(--ink)}.room-link-button span:first-child{font-weight:800;letter-spacing:.14em}.room-link-button span:last-child{font-size:11px;color:#8495ae}.table-layout{display:grid;grid-template-columns:minmax(0,620px) minmax(250px,1fr);gap:32px;align-items:start}.play-area{min-width:0}
.player-card{display:flex;align-items:center;gap:12px;padding:12px 10px;min-height:67px}.avatar{width:40px;height:40px;border:1px solid white;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#fef5ed,#e0edff);box-shadow:0 6px 14px #2c42710a;font-size:19px;font-weight:750;color:#6686b7}.player-card .player-name{font-size:13px;font-weight:750}.player-card .player-detail{margin-top:4px;font-size:10px;color:#8b9db6}.player-turn{margin-left:auto;color:#6e8ebc;font-size:11px;background:#ffffff8f;border-radius:30px;padding:8px 12px}.online-dot{display:inline-block;width:5px;height:5px;background:#6ba89c;border-radius:50%;margin-right:5px}.offline-dot{background:#a4adbb}
.board-frame{padding:10px;border-radius:20px;background:linear-gradient(135deg,#fbfdffd9,#dce9f5);box-shadow:0 18px 40px #3d679b1c;border:1px solid white}.board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));width:100%;aspect-ratio:1;overflow:hidden;border-radius:11px;border:1px solid #849cba44;touch-action:manipulation}.square{position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;padding:0;border:0;border-radius:0;background:#faf4e9;color:#293f64;aspect-ratio:1;line-height:1;isolation:isolate}.square.dark{background:#91b1cc}.square:disabled{opacity:1;cursor:default}.square.selected{background:#f4c2d0}.square.last{box-shadow:inset 0 0 0 100px #d9b4cd4a}.square.check{background:#f5b6c6}.square.selected.last{background:#f4c2d0}.piece{z-index:1;font-family:"Segoe UI Symbol","DejaVu Sans",serif;font-size:clamp(24px,4.8vw,57px);line-height:1;filter:drop-shadow(0 2px 1px #24395522)}.piece.white{color:#fffdf6;-webkit-text-stroke:1px #637e9f}.piece.black{color:#2d466c;-webkit-text-stroke:.5px #edf4ff55}.square.legal:after{content:"";position:absolute;width:24%;height:24%;background:#527bb78c;border-radius:50%;z-index:2}.square.legal:has(.piece):after{width:85%;height:85%;background:transparent;border:5px solid #5376a773}.coord{position:absolute;font-size:9px;line-height:1;color:#5a7798;z-index:3}.coord.file{right:4px;bottom:4px}.coord.rank{left:4px;top:4px}.square.dark .coord{color:#eaf3fc}.square:focus-visible{outline:3px solid #faadc9;outline-offset:-3px;z-index:4}
.table-sidebar{padding-top:10px}.status-card,.record-card{border:1px solid #fff;border-radius:24px;background:#ffffffa3;padding:26px;box-shadow:0 12px 30px #2c427108}.status-mark{font-size:30px;color:#8ba9cf;margin-bottom:15px}.status-card h2{font-size:23px;letter-spacing:-.03em;margin:0 0 12px}.status-card>p{font-size:12px;line-height:1.8;color:#7e91ad;margin:0 0 20px}.table-actions{display:grid;gap:10px}.table-actions button{width:100%;min-height:46px}.secondary{border:1px solid #bbcce0;background:#eff5fc88;color:#5e7fad;border-radius:13px;padding:11px 14px;font-size:12px;font-weight:650}.danger{border:1px solid #e9b8c7;background:#fff4f5;color:#b57488;border-radius:13px;padding:11px 14px;font-size:12px}.status-card .safety-note{font-size:10px;line-height:1.7;margin:20px 0 0;color:#98a7b8}.record-card{margin-top:16px;padding:20px 24px}.record-card h3{font-size:12px;margin:0}.record-card .section-heading>span{font-size:10px;color:#9aabc2}.move-history{display:grid;grid-template-columns:30px 1fr 1fr;gap:11px;margin-top:20px;font-size:12px;max-height:188px;overflow-y:auto;font-family:ui-monospace,monospace}.move-history .move-no{color:#9badc3}.history-empty{grid-column:1/-1;color:#9badc3;font-size:11px;font-family:inherit}.exit-button{display:block;margin:16px auto 0}
.connection-banner{border:1px solid #edc2d0;background:#fff3f5bd;color:#b3778a;font-size:12px;border-radius:13px;padding:13px 17px;margin-bottom:20px}.game-footer{max-width:1376px;margin:auto;padding:16px 32px 25px;display:flex;gap:20px;align-items:center;justify-content:space-between;color:#94a4ba;font-size:10px}.game-footer>span:last-child{letter-spacing:.16em;font-size:9px}.toast{position:fixed;bottom:max(28px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:min(90vw,520px);background:#304b75f2;color:#fff9ef;padding:15px 22px;border-radius:15px;font-size:12px;box-shadow:0 12px 30px #2c427133;z-index:50;line-height:1.7}.toast.error{background:#825769f2}
dialog{border:1px solid white;border-radius:26px;padding:30px;box-shadow:0 25px 80px #2c427133;background:#f4f8fc;color:var(--ink);max-width:calc(100vw - 32px)}dialog::backdrop{background:#2c427144;backdrop-filter:blur(8px)}dialog h2{font-size:23px}dialog p{font-size:12px;color:#8b9cb2;line-height:1.8}.promotion-options{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:24px 0}.promotion-options button{display:flex;flex-direction:column;align-items:center;gap:10px;font-size:42px;border:1px solid white;border-radius:14px;background:#e3edf9;color:#3c5b8d;padding:12px}.promotion-options span{font-size:12px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:1250px){.piece{font-size:57px}}
@media(max-width:900px){.table-layout{grid-template-columns:minmax(0,1fr) 260px;gap:20px}.table-sidebar .status-card{padding:20px}.lobby{column-gap:5%}.entry-card{padding:26px}.room-list{grid-template-columns:repeat(2,1fr)}.edition{display:none}}
@media(max-width:700px){.topbar{padding:14px 18px}.home-link,.account-link{padding:10px 14px;font-size:11px}.home-link{min-height:40px}.account-link{min-height:40px;max-width:42vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}main{padding:22px 18px 30px}.lobby{grid-template-columns:1fr;padding-top:4px;row-gap:24px}.lobby-story{text-align:center}.lobby-story h1{justify-content:center;font-size:42px;margin:14px 0 10px;gap:13px}.lobby-story .eyebrow{font-size:9px}.tagline{font-size:13px;letter-spacing:.1em;margin:0 0 10px}.hero-board{display:none}.game-notes{justify-content:center;margin:20px 0 0;gap:12px;font-size:10px}.entry-card{padding:24px;border-radius:24px}.card-heading{margin-bottom:20px;font-size:11px}.create-button{min-height:58px;font-size:17px;letter-spacing:.09em}.divider{margin:24px 0 18px}.entry-help{font-size:10px}.rules-card{margin-top:12px}.rooms-section{margin-top:4px}.room-list{grid-template-columns:1fr}.room-card{padding:17px 20px}.room-card strong{max-width:60vw}.section-heading h2{font-size:15px}.game-footer{padding:12px 18px 22px;gap:10px;flex-wrap:wrap;font-size:9px}.game-footer>span:last-child{display:none}
.table-heading{margin-bottom:15px}.table-heading h1{font-size:20px;max-width:54vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.table-heading .eyebrow{font-size:8px}.room-link-button{padding:10px 12px;gap:10px;border-radius:13px}.room-link-button span:first-child{font-size:12px;letter-spacing:.09em}.room-link-button span:last-child{font-size:9px}.table-layout{grid-template-columns:minmax(0,1fr);gap:15px}.board-frame{padding:7px;border-radius:15px}.board{border-radius:8px}.piece{font-size:clamp(26px,8.9vw,53px)}.coord{font-size:7px}.coord.file{right:3px;bottom:3px}.coord.rank{left:3px;top:3px}.player-card{min-height:59px;padding:9px 5px;gap:10px}.avatar{width:35px;height:35px;border-radius:11px;font-size:17px}.player-card .player-name{font-size:12px}.player-card .player-detail{font-size:9px}.player-turn{font-size:10px;padding:7px 11px}.table-sidebar{padding-top:0}.status-card{padding:21px;border-radius:19px;position:relative}.status-mark{position:absolute;right:20px;top:20px;font-size:26px;margin:0;opacity:.6}.status-card h2{font-size:21px;margin-right:35px}.status-card>p{font-size:11px;margin-bottom:17px}.table-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.table-actions button:first-child{grid-column:1/-1}.table-actions button{min-height:44px}.status-card .safety-note{margin-top:16px;font-size:10px}.record-card{padding:19px 21px;border-radius:18px;margin-top:12px}.move-history{max-height:110px;font-size:11px;margin-top:16px}.exit-button{margin-top:10px}.connection-banner{font-size:11px;padding:11px 13px;margin-bottom:12px}}
@media(prefers-reduced-motion:no-preference){.primary,.secondary,.room-card{transition:transform .18s ease,box-shadow .18s ease}.primary:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 13px 24px #5b85d22e}.square:not(:disabled):hover{filter:brightness(1.035)}}
