@font-face {
    font-family: 'Golos Text';
    src: url('fonts/golos-text.ttf') format('truetype');
    font-weight: 400 900;
    font-display: swap;
}
:root {
    --paper: #f5edda;
    --sheet: #fff9eb;
    --ink: #292a24;
    --pine: #214b3c;
    --berry: #822f38;
    --gold: #dfb75b;
    --muted: #605e50;
    --rule: #b7af99;
    font-family: 'Golos Text', sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    font-synthesis: none;
}
* { box-sizing: border-box; }
body { min-width: 0; margin: 0; overflow-x: clip; font: inherit; color: inherit; background: inherit; }
::selection { background: var(--gold); color: var(--ink); }
a { color: var(--berry); text-underline-offset: 5px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
.site-header { border-top: 7px solid var(--pine); }
.site-header nav { max-width: 1240px; margin: auto; padding: 25px 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 2px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--pine); font-family: Georgia, 'Times New Roman', serif; font-size: 25px; font-weight: 700; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { font: 42px/1 Georgia, serif; color: var(--berry); transform: rotate(-12deg); }
.nav-link { padding: 10px 0 10px 15px; color: var(--ink); font-size: 15px; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.games-nav-link { color: var(--ink); font-size: 14px; white-space: nowrap; }
.games-nav-short { display: none; }
.logout-form { display: block; margin: 0; }
.logout-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; align-self: auto; padding: 8px 16px; border: 2px solid var(--ink); background: var(--sheet); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); font-size: 14px; font-weight: 600; }
.logout-button:hover { background: var(--gold); color: var(--ink); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); text-decoration: none; }
.logout-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
main { max-width: 1240px; margin: auto; padding: 55px 48px 85px; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; line-height: 1.12; overflow-wrap: anywhere; }
h1 { font-size: clamp(38px, 5vw, 64px); letter-spacing: -.045em; margin: 0 0 22px; }
h2 { font-size: 30px; letter-spacing: -.035em; margin: 0 0 22px; }
h3 { font-size: 25px; letter-spacing: -.025em; margin: 0 0 9px; }
p { margin: 0 0 20px; max-width: 65ch; }
.hint { color: var(--muted); font-size: 14px; }
.page-heading { margin-bottom: 36px; max-width: 100%; }
.page-heading p { margin-bottom: 0; }
.page-heading .status { margin-bottom: 20px; padding: 5px 13px; font-size: 14px; font-weight: 600; }
.panel { position: relative; min-width: 0; background: var(--sheet); border: 2px solid var(--ink); padding: 32px; box-shadow: 6px 6px 0 var(--ink); }
form { display: flex; flex-direction: column; align-items: stretch; margin: 0; min-width: 0; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 9px; }
.form-field { margin-bottom: 22px; }
input, textarea { display: block; width: 100%; min-width: 0; border: 1.5px solid var(--ink); border-radius: 0; background: #fffdf7; color: var(--ink); padding: 12px 14px; font: inherit; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:hover, textarea:hover { border-color: var(--pine); }
textarea { resize: vertical; min-height: 110px; margin-bottom: 10px; }
input[type="hidden"] { display: none; }
form p { font-size: 14px; color: var(--muted); margin-bottom: 26px; }
.button, button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; align-self: flex-start; padding: 13px 23px; border: 2px solid var(--ink); border-radius: 0; background: var(--pine); color: var(--sheet); box-shadow: 4px 4px 0 var(--ink); font: inherit; font-size: 15px; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none; cursor: pointer; transition: transform 90ms steps(2, end), box-shadow 90ms steps(2, end), background-color 90ms steps(2, end); }
.button:hover, button:hover { background: #173c2f; color: var(--sheet); transform: translate(-1px, -2px) rotate(-1deg); box-shadow: 5px 6px 0 var(--ink); text-decoration: none; }
.button:active, button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.secondary { background: var(--sheet); color: var(--ink); }
.secondary:hover { background: var(--gold); color: var(--ink); }
.compact { min-height: 42px; padding: 8px 16px; box-shadow: 3px 3px 0 var(--ink); font-size: 14px; }
.button:disabled, button:disabled { background: #ded8c7; color: #626052; border-color: #858170; box-shadow: none; transform: none; cursor: not-allowed; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--berry); outline-offset: 5px; }
h1:focus { outline: none; }
.welcome { display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: center; padding: 14px 0 60px; }
.welcome-copy { position: relative; z-index: 1; }
.welcome h1 { font-size: clamp(76px, 8.7vw, 116px); line-height: .92; letter-spacing: -.065em; color: var(--pine); margin: 0 0 30px; }
.intro { font-family: Georgia, 'Times New Roman', serif; font-size: 25px; line-height: 1.35; max-width: 360px; margin-bottom: 16px; }
.welcome-description { max-width: 390px; color: var(--muted); font-size: 15px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: 30px; }
.text-link { font-size: 14px; color: var(--ink); }
/* A paper postcard tucked into a folded envelope. */
.mail-scene { position: relative; height: 460px; width: 100%; max-width: 490px; justify-self: end; }
.postcard { position: absolute; left: 13%; top: 16px; width: 74%; height: 340px; padding: 22px 20px; border: 2px solid var(--ink); background: var(--sheet); transform: rotate(7deg); box-shadow: 5px 5px 0 var(--ink); }
.postcard img { display: block; width: 100%; height: 225px; object-fit: contain; }
.postcard-caption { display: block; font: italic 19px/1.3 Georgia, serif; color: var(--pine); text-align: center; }
.postcard-signature { display: block; text-align: right; font: italic 18px/1.3 Georgia, serif; }
.envelope { position: absolute; width: 90%; height: 225px; left: 2%; bottom: 32px; border: 2px solid var(--ink); background: #d6b97d; transform: rotate(-6deg); box-shadow: 7px 8px 0 var(--ink); overflow: hidden; }
.envelope::before { content: ''; position: absolute; inset: 0; background: #e8cc94; clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%); }
.envelope::after { content: ''; position: absolute; inset: 0; background: #f0d6a2; clip-path: polygon(0 100%, 50% 43%, 100% 100%); }
.envelope-label { position: absolute; z-index: 1; left: 25px; bottom: 24px; font: italic 23px/1 Georgia, serif; }
.wax-seal { position: absolute; z-index: 1; right: 32px; top: 96px; display: grid; place-items: center; width: 59px; height: 59px; color: var(--sheet); background: var(--berry); border: 3px double var(--sheet); border-radius: 50%; font: italic 38px/1 Georgia, serif; transform: rotate(12deg); box-shadow: 2px 3px 0 var(--ink); }
.mail-spark { position: absolute; font: 70px/1 Georgia, serif; color: var(--berry); }
.spark-one { top: -9px; left: -10px; transform: rotate(10deg); }
.spark-two { top: 118px; right: -2px; color: var(--pine); font-size: 50px; }
.mail-note { position: absolute; right: 21px; bottom: -6px; font: italic 22px/1.3 Georgia, serif; transform: rotate(-5deg); color: var(--berry); }
.how-it-works { display: grid; grid-template-columns: .8fr 2fr; gap: 56px; border-top: 2px solid var(--ink); padding-top: 40px; }
.how-it-works > h2 { font-size: 38px; color: var(--pine); }
.steps-list { list-style: none; padding: 0; margin: 0; }
.steps-list li { display: grid; grid-template-columns: 40px 1fr; gap: 18px; padding: 0 0 24px; margin: 0 0 24px; border-bottom: 1px dashed var(--rule); }
.steps-list li:last-child { margin: 0; padding: 0; border-bottom: none; }
.steps-list p { color: var(--muted); font-size: 14px; margin: 0; max-width: 57ch; }
.step { width: 36px; height: 38px; display: grid; place-items: center; border: 1.5px solid var(--ink); background: var(--gold); font: italic 25px/1 Georgia, serif; transform: rotate(-6deg); }
.steps-list li:nth-child(2) .step { transform: rotate(5deg); background: var(--sheet); }
.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) 355px; gap: 48px; align-items: start; }
.create-panel { margin-top: 15px; background: #ead7a8; transform: rotate(1deg); }
.create-panel h2 { padding-right: 30px; }
.create-panel input { margin-bottom: 24px; }
.create-panel .button, .create-panel button { width: 100%; }
.paper-corner { position: absolute; top: -26px; right: 15px; font: 65px/1 Georgia, serif; color: var(--berry); }
.game-list { min-width: 0; }
.game-card { display: flex; gap: 18px; align-items: center; background: var(--sheet); padding: 25px 22px; border: 2px solid var(--ink); margin-bottom: 18px; color: var(--ink); text-decoration: none; box-shadow: 3px 3px 0 var(--ink); transition: transform 90ms steps(2, end); }
.game-card:hover { transform: translateX(3px); background: #eee4cd; text-decoration: none; }
.game-card-icon { color: var(--berry); font: 42px/1 Georgia, serif; flex-shrink: 0; }
.game-card-content { min-width: 0; flex: 1; }
.game-title { display: block; overflow-wrap: anywhere; font-family: Georgia, serif; font-size: 25px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.game-open { color: var(--pine); font: 34px/1 Georgia, serif; }
.status { display: inline-block; border: 1px solid currentColor; padding: 3px 10px; background: #f0e0b8; color: #5d471c; font-size: 12px; font-weight: 500; }
.status-published { background: var(--pine); color: var(--sheet); border-color: var(--pine); }
.status-closed { background: #e4ddcd; color: #575548; }
.empty-state { padding: 10px 24px 35px; border: 2px dashed var(--rule); }
.empty-state .winter-art { width: 210px; margin: 0 0 8px; }
.empty-state h2 { margin-bottom: 12px; }
.empty-state p { color: var(--muted); font-size: 14px; max-width: 360px; margin-bottom: 0; }
.winter-art { width: 240px; max-width: 100%; flex: 0 0 auto; }
.winter-art img { display: block; width: 100%; height: auto; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 85px; align-items: center; max-width: 1000px; margin: 15px auto; }
.auth-aside { color: var(--pine); padding: 25px 0; }
.auth-aside p { font: 700 clamp(32px, 3.9vw, 48px)/1.1 Georgia, serif; letter-spacing: -.035em; margin: 20px 0 0; max-width: 10ch; }
.auth-flower { color: var(--berry); font: 64px/1 Georgia, serif; display: inline-block; transform: rotate(10deg); }
.auth-aside img { display: block; max-width: 100%; width: 250px; height: auto; margin-left: 70px; transform: rotate(-7deg); }
.auth-panel { width: 100%; padding: 34px; }
.auth-panel::before { content: ''; position: absolute; width: 95px; height: 24px; top: -14px; left: calc(50% - 47px); border: 1px solid #b7af99; background: #dfcfaa; transform: rotate(-4deg); }
.auth-panel h1 { font-size: 40px; margin-bottom: 30px; }
.auth-form .button { width: 100%; }
.auth-panel > p { font-size: 14px; margin: 25px 0 0; }
.auth-switch { border-top: 1px dashed var(--rule); padding-top: 20px; }
.game-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 30px; align-items: start; margin-bottom: 30px; }
.configuration-panel { max-width: 760px; }
.configuration-panel textarea { background: #fffdf7; }
.draw-panel { background: #ead7a8; margin-top: 45px; box-shadow: 5px 5px 0 var(--ink); }
.draw-panel p { color: var(--ink); font-size: 14px; }
.draw-panel .button { width: 100%; background: var(--berry); }
.draw-panel .button:disabled { background: #ded8c7; }
.close-form { display: block; max-width: none; margin: -15px 0 24px; padding: 0; border: 0; }
.finish-button { appearance: none; display: inline; min-height: 0; align-self: auto; padding: 8px 0; border: 0; background: transparent; color: var(--berry); box-shadow: none; font-size: 14px; font-weight: 500; }
.finish-button:hover { background: transparent; color: var(--berry); box-shadow: none; transform: none; text-decoration: underline; text-underline-offset: 5px; }
.finish-button:active { box-shadow: none; transform: none; }
.role-tabs { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 980px; margin: 38px 0; }
.role-tab-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.role-tab { margin: 0; padding: 14px 18px; border: 2px solid var(--rule); border-bottom-color: var(--ink); background: #e8dfca; color: var(--muted); font: 700 20px/1.2 Georgia, 'Times New Roman', serif; text-align: center; cursor: pointer; }
.role-tab:hover { color: var(--ink); background: #eee4cd; }
.role-tab-toggle:focus-visible + .role-tab { outline: 3px solid var(--berry); outline-offset: -4px; }
.giver-role-toggle:checked + .role-tab { position: relative; z-index: 2; border-color: var(--pine); border-bottom-color: var(--sheet); background: var(--sheet); color: var(--pine); }
.receiver-role-toggle:checked + .role-tab { position: relative; z-index: 2; border-color: var(--berry); border-bottom-color: var(--sheet); background: var(--sheet); color: var(--berry); }
.role-tab-panel { display: none; grid-column: 1 / -1; min-width: 0; margin-top: -2px; }
.giver-role-toggle:checked ~ .giver-tab-panel, .receiver-role-toggle:checked ~ .receiver-tab-panel { display: block; }
.only-role { grid-column: 1 / -1; max-width: 760px; }
.role-zone { min-width: 0; padding: 28px; border: 2px solid var(--ink); background: color-mix(in srgb, var(--sheet) 75%, transparent); }
.giver-zone { border-top: 6px solid var(--pine); }
.receiver-zone { border-top: 6px solid var(--berry); }
.recipient-card { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 18px; align-items: start; padding: 24px; margin-bottom: 24px; background: var(--sheet); border: 1.5px solid var(--pine); }
.recipient-card > div { min-width: 0; }
.recipient-card > img { display: block; width: 112px; height: auto; transform: rotate(3deg); }
.recipient-label { margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.recipient-name { font: 700 clamp(30px, 4vw, 48px)/1.15 Georgia, serif; letter-spacing: -.035em; color: var(--pine); overflow-wrap: anywhere; margin-bottom: 14px; }
.recipient-email { overflow-wrap: anywhere; margin: 0; color: var(--muted); font-size: 14px; }
.recipient-message { margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--rule); }
.recipient-message h3 { font-size: 20px; color: var(--berry); }
.role-message, .incoming-message { padding: 24px; background: var(--sheet); border: 1.5px solid var(--rule); }
.role-message + .role-message, .incoming-message + .role-message { margin-top: 20px; }
.role-message > h3, .incoming-message > h3 { margin-bottom: 18px; font-size: 22px; }
.incoming-message { margin-bottom: 20px; border-color: var(--berry); }
.incoming-message > h3 { color: var(--berry); }
.message-switch { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.message-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.message-tab { margin: 0; padding: 9px 12px; border-bottom: 2px solid var(--rule); color: var(--muted); text-align: center; cursor: pointer; }
.message-tab:hover { color: var(--ink); }
.message-toggle:focus-visible + .message-tab { outline: 3px solid var(--berry); outline-offset: -3px; }
.message-toggle:checked + .message-tab { border-color: var(--pine); background: #eee4cd; color: var(--ink); }
.message-view { display: none; grid-column: 1 / -1; min-width: 0; padding-top: 20px; }
.preview-toggle:checked ~ .preview-view, .editor-toggle:checked ~ .editor-view { display: block; }
.preview-view { max-height: 480px; overflow: auto; }
.markdown-content { overflow-wrap: anywhere; }
.markdown-content > :last-child { margin-bottom: 0; }
.markdown-content h1 { font-size: 30px; margin: 24px 0 12px; }
.markdown-content h2 { font-size: 26px; margin: 22px 0 10px; }
.markdown-content h3, .markdown-content h4 { font-size: 21px; margin: 20px 0 9px; }
.markdown-content ul, .markdown-content ol { margin: 0 0 20px; padding-left: 28px; }
.markdown-content blockquote { margin: 0 0 20px; padding: 10px 18px; border-left: 4px solid var(--gold); background: #f2e5c7; }
.markdown-content blockquote p { margin: 0; }
.markdown-content code { padding: 2px 5px; background: #e8dfca; font-family: ui-monospace, monospace; font-size: .92em; }
.markdown-content pre { overflow-x: auto; padding: 15px; background: var(--ink); color: var(--sheet); }
.markdown-content pre code { padding: 0; background: transparent; color: inherit; }
.markdown-content table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.markdown-content th, .markdown-content td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; }
.markdown-content img { display: block; max-width: 100%; height: auto; max-height: 600px; object-fit: contain; margin: 16px 0; border: 1px solid var(--rule); }
.error { border: 2px solid var(--berry); border-left-width: 7px; padding: 16px 20px; background: #f5e0d8; color: #702731; margin-bottom: 26px; overflow-wrap: anywhere; font-size: 14px; }
.message-panel { max-width: 640px; margin: 30px auto; padding: 40px; }
.message-panel h1 { font-size: 42px; color: var(--berry); }
.skip-link { position: absolute; top: -100px; }
.skip-link:focus { top: 8px; left: 8px; background: var(--sheet); padding: 10px 15px; z-index: 100; }
#blazor-error-ui { display: none; position: fixed; bottom: 0; width: 100%; background: #f5e0d8; padding: 16px; border-top: 2px solid var(--berry); z-index: 50; }
@media (max-width: 1000px) {
    .site-header nav { margin: 0 32px; padding: 23px 0; }
    main { padding: 42px 32px 70px; }
    .welcome { gap: 20px; }
    .mail-scene { height: 410px; }
    .postcard { height: 310px; padding: 18px 12px; }
    .postcard img { height: 200px; }
    .postcard-caption { font-size: 17px; }
    .envelope { height: 200px; }
    .wax-seal { top: 80px; right: 20px; }
    .dashboard { grid-template-columns: minmax(0, 1fr) 310px; gap: 30px; }
    .auth-layout { gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); }
    .auth-aside img { margin-left: 0; }
    .game-workspace { grid-template-columns: minmax(0, 1fr) 270px; gap: 24px; }
    .game-workspace .panel { padding: 24px; }
}
@media (max-width: 760px) {
    .welcome { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 14px; }
    .welcome h1 { font-size: clamp(64px, 10.4vw, 80px); }
    .intro { font-size: 22px; }
    .mail-scene { height: 350px; }
    .postcard { top: 5px; width: 83%; left: 9%; height: 260px; padding: 15px 8px; }
    .postcard img { height: 160px; }
    .postcard-caption { font-size: 15px; }
    .postcard-signature { font-size: 15px; }
    .envelope { width: 94%; height: 160px; bottom: 35px; }
    .envelope-label { font-size: 18px; left: 15px; bottom: 16px; }
    .wax-seal { width: 45px; height: 45px; top: 65px; right: 15px; font-size: 30px; }
    .spark-one { font-size: 45px; }
    .spark-two { font-size: 35px; right: -5px; }
    .mail-note { font-size: 18px; }
    .how-it-works { gap: 28px; grid-template-columns: .85fr 1.6fr; }
    .how-it-works > h2 { font-size: 32px; }
    .dashboard, .game-workspace { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .create-panel { grid-row: 1; margin-top: 8px; transform: none; }
    .draw-panel { margin-top: 0; max-width: 100%; }
    .auth-layout { grid-template-columns: minmax(0, 1fr); max-width: 460px; gap: 18px; margin-top: 0; }
    .auth-aside { display: none; }
}
@media (max-width: 560px) {
    .site-header { position: sticky; top: 0; z-index: 40; border-top-width: 5px; background: var(--paper); }
    .site-header nav { min-height: 57px; margin: 0 14px; padding: 9px 0; flex-wrap: nowrap; gap: 10px; }
    .brand { flex: 0 0 auto; font-size: 21px; gap: 0; }
    .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .brand-mark { font-size: 32px; }
    .header-actions { width: auto; min-width: 0; justify-content: flex-end; gap: 10px; margin: 0; }
    .games-nav-link { font-size: 13px; }
    .logout-button { min-height: 36px; padding: 5px 12px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); }
    main { width: 100%; padding: 26px 16px 56px; }
    h1 { font-size: clamp(34px, 10.5vw, 38px); }
    h2 { font-size: 28px; }
    h3 { font-size: 24px; }
    .page-heading { margin-bottom: 26px; }
    .panel { padding: 22px 18px; box-shadow: 4px 4px 0 var(--ink); }
    .welcome { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 4px 0 38px; }
    .welcome h1 { font-size: clamp(76px, 20vw, 104px); margin-bottom: 25px; }
    .intro { font-size: 24px; max-width: 280px; }
    .welcome-description { font-size: 14px; }
    .actions { gap: 21px; margin-top: 25px; }
    .mail-scene { height: 355px; max-width: 345px; justify-self: center; }
    .postcard { width: 75%; left: 14%; height: 270px; }
    .postcard img { height: 170px; }
    .envelope { width: 90%; left: 3%; height: 170px; }
    .wax-seal { top: 70px; }
    .spark-one { left: 0; }
    .spark-two { right: 0; }
    .how-it-works { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-top: 30px; }
    .how-it-works > h2 { margin: 0; font-size: 34px; }
    .how-it-works > h2 br { display: none; }
    .steps-list li { gap: 14px; }
    .dashboard { gap: 24px; }
    .create-panel { margin-top: 0; }
    .create-panel h2 { margin-bottom: 18px; padding-right: 0; }
    .create-panel input { margin-bottom: 20px; }
    .game-title { font-size: 23px; }
    .game-card { padding: 19px 15px; gap: 12px; }
    .game-card-icon { font-size: 32px; }
    .auth-panel { margin-top: 12px; }
    .auth-panel h1 { font-size: 36px; }
    .role-tabs { margin: 26px 0 0; }
    .role-tab { position: sticky; top: 62px; z-index: 20; padding: 11px 6px; background: #e8dfca; font-size: 17px; }
    .giver-role-toggle:checked + .role-tab, .receiver-role-toggle:checked + .role-tab { position: sticky; z-index: 21; }
    .role-tab-panel { overflow: hidden; }
    .role-zone { padding: 16px; }
    .recipient-card { grid-template-columns: minmax(0, 1fr) 76px; padding: 16px; gap: 10px; }
    .recipient-card > img { width: 76px; }
    .role-message, .incoming-message { padding: 16px; }
    .message-tab { padding-inline: 8px; font-size: 13px; }
    .preview-view { max-height: 360px; }
    .message-panel { padding: 26px 22px; }
    .message-panel h1 { font-size: 36px; }
    .markdown-content { min-width: 0; max-width: 100%; }
    .markdown-content table { display: block; overflow-x: auto; }
}
@media (max-width: 380px) {
    .site-header nav { margin-inline: 10px; gap: 8px; }
    .header-actions { gap: 8px; }
    .games-nav-full { display: none; }
    .games-nav-short { display: inline; }
    .logout-button { padding-inline: 10px; }
    main { padding-inline: 12px; }
    .panel { padding-inline: 15px; }
    .game-card-icon { display: none; }
    .game-card { gap: 8px; }
    .role-tab { padding-inline: 4px; font-size: 15px; }
    .role-zone { padding: 12px; }
    .recipient-card { grid-template-columns: minmax(0, 1fr) 68px; padding: 13px; gap: 8px; }
    .recipient-card > img { width: 68px; }
    .role-message, .incoming-message { padding: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
