.sit-osudu-page {
    --fate-ink: #e9e5d6;
    --fate-muted: #b9b39f;
    --fate-panel: rgba(18, 25, 22, .92);
    --fate-line: rgba(194, 173, 103, .28);
    --fate-gold: #d8bd6d;
    --fate-green: #46a875;
    --fate-red: #c95f67;
    --fate-violet: #9b75c8;
}

.fate-shell { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1rem 4rem; color: var(--fate-ink); }
.fate-hero, .fate-room-head { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; margin-bottom: 1.5rem; padding: clamp(1.4rem,4vw,3rem); border: 1px solid var(--fate-line); border-radius: 28px; background: radial-gradient(circle at 85% 15%, rgba(83,132,98,.23), transparent 38%), linear-gradient(145deg,#111a17,#22231c); box-shadow: 0 24px 70px rgba(0,0,0,.24); }
.fate-hero h1, .fate-room-head h1 { margin: .1rem 0 .7rem; font-size: clamp(2.3rem,7vw,5rem); line-height: .98; }
.fate-lead { max-width: 720px; margin: 0; color: var(--fate-muted); font-size: clamp(1.05rem,2vw,1.3rem); }
.fate-facts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.fate-facts span { padding: .5rem .75rem; border: 1px solid var(--fate-line); border-radius: 999px; background: rgba(255,255,255,.035); }
.fate-hero-mark { display: grid; grid-template-columns: repeat(5,1fr); gap: .35rem; align-items: center; min-width: 260px; color: var(--fate-gold); font-size: clamp(1.5rem,4vw,3rem); text-shadow: 0 0 22px rgba(216,189,109,.55); }

.fate-panel, .fate-game { margin: 1.25rem 0; padding: clamp(1.15rem,3vw,2rem); border: 1px solid var(--fate-line); border-radius: 24px; background: var(--fate-panel); box-shadow: 0 14px 44px rgba(0,0,0,.16); }
.fate-heading { max-width: 760px; }
.fate-heading h2, .fate-panel h2 { margin: .15rem 0 .5rem; }
.fate-heading p:last-child { color: var(--fate-muted); }

.fate-mode-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin: 1.5rem 0; }
.fate-mode { min-height: 190px; display: grid; align-content: start; gap: .5rem; padding: 1.2rem; text-align: left; color: inherit; border: 1px solid var(--fate-line); border-radius: 20px; background: rgba(255,255,255,.025); cursor: pointer; transition: transform .16s ease,border-color .16s ease,background .16s ease; }
.fate-mode:hover { transform: translateY(-2px); border-color: rgba(216,189,109,.62); }
.fate-mode.is-selected { border-color: var(--fate-gold); background: rgba(216,189,109,.08); box-shadow: inset 0 0 0 1px rgba(216,189,109,.2); }
.fate-mode strong { font-size: 1.18rem; }
.fate-mode span:not(.fate-mode-icon) { color: var(--fate-muted); }
.fate-mode em { margin-top: auto; color: var(--fate-gold); font-style: normal; font-weight: 700; }
.fate-mode-icon { font-size: 2.4rem; color: var(--fate-gold); }

.fate-difficulty { margin: 1rem 0 1.25rem; }
.fate-option-label { display: block; margin-bottom: .65rem; font-weight: 700; }
.fate-difficulty-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; }
.fate-difficulty-grid button { display: grid; gap: .35rem; min-height: 108px; padding: .85rem; text-align: left; color: inherit; border: 1px solid var(--fate-line); border-radius: 14px; background: rgba(255,255,255,.03); cursor: pointer; transition: border-color .16s ease,background .16s ease,transform .16s ease; }
.fate-difficulty-grid button:hover { transform: translateY(-1px); border-color: rgba(216,189,109,.58); }
.fate-difficulty-grid button.is-selected { border-color: var(--fate-gold); background: rgba(216,189,109,.1); box-shadow: inset 0 0 0 1px rgba(216,189,109,.16); }
.fate-difficulty-grid strong { color: var(--fate-gold); }
.fate-difficulty-grid span { color: var(--fate-muted); font-size: .9rem; line-height: 1.35; }
.fate-player-count { display: flex; gap: 1rem; align-items: center; margin: 1rem 0; }
.fate-player-count > span { font-weight: 700; }
.fate-player-count div { display: flex; gap: .45rem; }
.fate-player-count button, .fate-controls button { min-width: 44px; padding: .6rem .8rem; color: inherit; border: 1px solid var(--fate-line); border-radius: 10px; background: rgba(255,255,255,.04); cursor: pointer; }
.fate-player-count button.is-selected { border-color: var(--fate-gold); background: rgba(216,189,109,.12); }
.fate-rules { margin: 1.3rem 0; padding: 1rem 1.1rem; border-left: 3px solid var(--fate-gold); border-radius: 0 14px 14px 0; background: rgba(255,255,255,.025); }
.fate-rules h3 { margin-top: 0; }
.fate-rules ol { margin-bottom: 0; padding-left: 1.25rem; color: var(--fate-muted); }
.fate-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.fate-actions p { margin: 0; color: var(--fate-muted); }

.fate-scorebar { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: .65rem; margin-bottom: 1rem; }
.fate-score { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .75rem .9rem; border: 1px solid var(--fate-line); border-radius: 14px; background: rgba(255,255,255,.03); }
.fate-score.is-current { box-shadow: 0 0 0 2px var(--seat-color,#fff); }
.fate-score small { display: block; color: var(--fate-muted); }
.fate-score strong { font-size: 1.35rem; }
.fate-gamebar { display: grid; grid-template-columns: minmax(120px,1fr) minmax(200px,2fr) minmax(80px,.6fr); gap: .7rem; align-items: center; margin-bottom: 1rem; }
.fate-gamebar > * { margin: 0; padding: .75rem .9rem; border: 1px solid var(--fate-line); border-radius: 14px; background: rgba(255,255,255,.025); }
.fate-gamebar div span { display: block; color: var(--fate-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.fate-gamebar div:last-child { text-align: right; }

.fate-board-wrap { width: min(100%,760px); margin: 0 auto; padding: clamp(22px,5vw,44px); border: 1px solid rgba(216,189,109,.25); border-radius: 24px; background: radial-gradient(circle at center,rgba(51,93,67,.2),transparent 70%),#111814; box-shadow: inset 0 0 42px rgba(0,0,0,.42); overflow: hidden; }
.fate-board { position: relative; width: 100%; aspect-ratio: 1; user-select: none; touch-action: manipulation; isolation: isolate; }
.fate-board::before { content: ''; position: absolute; z-index: 0; inset: 5%; border: 1px solid rgba(216,189,109,.08); border-radius: 50%; box-shadow: 0 0 55px rgba(70,168,117,.08), inset 0 0 55px rgba(216,189,109,.035); pointer-events: none; }
.fate-dot { position: absolute; z-index: 5; display: grid; place-items: center; width: clamp(18px,2.35vw,25px); aspect-ratio: 1; border: 1px solid #eadca6; border-radius: 50%; background: radial-gradient(circle at 35% 30%,#34483a,#18241d 62%,#0d1511); box-shadow: 0 0 0 3px rgba(216,189,109,.07),0 0 13px rgba(216,189,109,.38); color: #f0dfa1; font-family: 'Segoe UI Historic','Noto Sans Runic','Segoe UI Symbol',serif; font-size: clamp(10px,1.45vw,15px); font-weight: 700; line-height: 1; text-shadow: 0 0 7px rgba(240,223,161,.65); transform: translate(-50%,-50%); pointer-events: none; }
.fate-box { position: absolute; z-index: 1; display: grid; place-items: center; border-radius: 9px; background: color-mix(in srgb,var(--seat-color,transparent) 18%,transparent); box-shadow: inset 0 0 18px color-mix(in srgb,var(--seat-color,transparent) 30%,transparent); color: var(--seat-color,transparent); font-size: clamp(.8rem,3vw,1.65rem); opacity: 0; transition: opacity .2s ease; }
.fate-box.is-claimed { opacity: 1; }
.fate-edge { position: absolute; z-index: 4; padding: 0; border: 0; background: transparent; cursor: pointer; }
.fate-edge::before { content: ''; position: absolute; border-radius: 999px; background: rgba(222,216,191,.2); transition: background .12s ease,box-shadow .12s ease,transform .12s ease; }
.fate-edge.is-horizontal::before { left: 5%; right: 5%; top: 50%; height: 4px; transform: translateY(-50%); }
.fate-edge.is-vertical::before { top: 5%; bottom: 5%; left: 50%; width: 4px; transform: translateX(-50%); }
.fate-edge:not(.is-taken):hover::before, .fate-edge:not(.is-taken):focus-visible::before { background: rgba(216,189,109,.85); box-shadow: 0 0 14px rgba(216,189,109,.55); }
.fate-edge.is-taken { cursor: default; }
.fate-edge.is-taken::before { background: var(--seat-color); box-shadow: 0 0 10px color-mix(in srgb,var(--seat-color) 65%,transparent); }
.fate-edge.is-last::before { box-shadow: 0 0 0 2px #fff,0 0 17px var(--seat-color); }
.fate-edge:disabled { cursor: default; }
.fate-quick-rule { width: min(100%,760px); margin: 0 auto .8rem; padding: .72rem .9rem; text-align: center; border: 1px solid rgba(216,189,109,.24); border-radius: 14px; background: rgba(216,189,109,.055); color: var(--fate-muted); }
.fate-quick-rule strong { color: var(--fate-gold); }
.fate-help { text-align: center; color: var(--fate-muted); }
.fate-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin-top: .9rem; }
.fate-result { margin-top: 1.2rem; padding: 1.3rem; text-align: center; border: 1px solid var(--fate-gold); border-radius: 18px; background: rgba(216,189,109,.07); }
.fate-result h2 { margin: .2rem 0 .4rem; }

.fate-online-panel { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1.5rem; align-items: start; }
.fate-online-create, .fate-join-form, .fate-email-invite { display: grid; gap: .9rem; }
.fate-online-create label, .fate-join-form label, .fate-rematch-setup label { display: grid; gap: .35rem; }
.fate-online-create input, .fate-online-create select, .fate-join-form input, .fate-invite-box input, .fate-email-invite input, .fate-rematch-setup select { width: 100%; min-height: 44px; padding: .65rem .75rem; color: var(--fate-ink); border: 1px solid var(--fate-line); border-radius: 10px; background: #111814; }
.fate-lock, .fate-invite-box { padding: 1rem; border: 1px solid var(--fate-line); border-radius: 16px; background: rgba(255,255,255,.025); }
.fate-room-head { margin-bottom: 1.2rem; }
.fate-room-head h1 { font-size: clamp(2.1rem,6vw,4rem); }
.fate-invite-box > div, .fate-email-invite > div { display: grid; grid-template-columns: 1fr auto; gap: .55rem; }
.fate-invite-box p, .fate-email-invite p { margin: .4rem 0 0; color: var(--fate-muted); font-size: .9rem; }
.fate-online-players { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: .7rem; margin: 1rem 0; }
.fate-online-player { padding: .8rem; border: 1px solid var(--fate-line); border-radius: 14px; background: rgba(255,255,255,.025); }
.fate-online-player.is-connected { box-shadow: inset 3px 0 var(--seat-color); }
.fate-online-player small { color: var(--fate-muted); }
.fate-lobby-actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.fate-lobby-actions p { margin: 0; color: var(--fate-muted); }
.fate-rematch-setup { display: flex; justify-content: center; align-items: end; gap: .8rem; flex-wrap: wrap; }
.fate-error { color: #ffb0b0; }
.fate-online-error { margin: .7rem 0; padding: .8rem; border: 1px solid rgba(201,95,103,.45); border-radius: 12px; background: rgba(201,95,103,.08); }

@media (max-width: 760px) {
    .fate-hero, .fate-room-head, .fate-online-panel { grid-template-columns: 1fr; }
    .fate-hero-mark { display: none; }
    .fate-mode-grid { grid-template-columns: 1fr; }
    .fate-difficulty-grid { grid-template-columns: 1fr; }
    .fate-difficulty-grid button { min-height: 0; }
    .fate-gamebar { grid-template-columns: 1fr 1fr; }
    .fate-gamebar > p { grid-column: 1 / -1; grid-row: 2; }
    .fate-board-wrap { padding: 24px; }
    .fate-invite-box > div, .fate-email-invite > div { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .fate-shell { padding-inline: .65rem; }
    .fate-panel, .fate-game { padding: 1rem; border-radius: 18px; }
    .fate-board-wrap { padding: 18px; border-radius: 18px; }
    .fate-gamebar { grid-template-columns: 1fr; }
    .fate-gamebar > p { grid-column: auto; grid-row: auto; }
    .fate-gamebar div:last-child { text-align: left; }
}

@media (max-width: 480px) {
    .fate-board-wrap { padding: 18px; }
    .fate-dot { width: 18px; font-size: 10px; }
    .fate-edge.is-horizontal::before { height: 3px; }
    .fate-edge.is-vertical::before { width: 3px; }
}
