.trainer-desk {
    --paper: #ffdc91;
    --mint: #9be0c5;
    --caption: #b8c4c8;
    --seam: #3f5055;
    max-width: 1100px; margin: clamp(18px, 3vw, 34px) auto 54px; display: grid; gap: 18px;
}
.trainer-desk h1, .trainer-desk h2, .trainer-desk h3, .trainer-desk p { margin: 0; }
.trainer-desk :is(h1,h2,h3) { font-family: Cond, sans-serif; line-height: 1.05; }
.trainer-desk h1 { font-size: clamp(3rem, 6vw, 5.4rem); letter-spacing: -.035em; }
.trainer-desk h2 { font-size: clamp(1.8rem, 3.1vw, 2.45rem); letter-spacing: -.02em; }
.trainer-desk h3 { font-size: 1.38rem; }
.trainer-desk a { color: #ffdc89; }
.trainer-desk a:hover { text-decoration: underline; }
.trainer-cover {
    position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr;
    align-items: center; gap: clamp(22px, 4vw, 52px); padding: clamp(24px,4vw,46px);
    background: radial-gradient(ellipse at 82% 55%, #344e51, transparent 65%), linear-gradient(120deg, #1d292e, #233739 75%, #26383b);
    border: 1px solid #4c6263; border-radius: 16px; box-shadow: inset 0 1px #adcabe19;
}
.trainer-cover::before {
    content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
    background: repeating-radial-gradient(ellipse at 93% 115%, transparent 0 15px, #b6dcc414 16px, transparent 17px 22px);
    mask-image: linear-gradient(100deg, transparent 14%, black);
}
.trainer-cover > div:first-child { display: grid; gap: 12px; }
.trainer-cover p:not(.ticket-kicker) { font-size: 1.08rem; line-height: 1.45; color: #e0e8e7; max-width: 38ch; }
.trainer-cover p strong { color: var(--paper); }
.trainer-cover small { color: var(--caption); font-size: .86rem; }
.ticket-kicker, .ticket-issuer, .ticket-edition, .ticket-stub { font: 750 .78rem/1.2 system-ui,sans-serif; letter-spacing: .09em; text-transform: uppercase; }
.ticket-kicker { color: var(--paper); display: flex; align-items: center; gap: 9px; }
.ticket-kicker::before { content: ''; width: 20px; height: 2px; background: currentColor; }
.trainer-ticket { position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr 18%; color: #243332; background: repeating-linear-gradient(128deg,transparent 0 8px,#fff2 9px 10px),linear-gradient(115deg,#f9dc94,#ffeab3 44%,#99d2c1); border-radius: 9px; padding: 8px; box-shadow: 0 11px 22px #10161b70; transform: rotate(-2deg); }
.trainer-ticket::before, .trainer-ticket::after { content: ''; position: absolute; z-index: 3; width: 14px; height: 14px; right: calc(18% - 2px); border-radius: 50%; background: #273b40; }
.trainer-ticket::before { top: -8px; }
.trainer-ticket::after { bottom: -8px; }
.ticket-face { position: relative; min-width: 0; min-height: 182px; padding: 12px 12px 24px; border: 1px solid #36564c88; border-right: 0; border-radius: 4px 0 0 4px; overflow: hidden; }
.ticket-face > strong { display: block; position: relative; z-index: 1; font-size: clamp(1.9rem,4vw,3.45rem); line-height: .88; margin: 15px 0 9px; letter-spacing: -.04em; }
.ticket-issuer { display: flex; align-items: center; gap: 6px; font-size: .67rem; }
.ticket-mon { position: absolute; right: -1%; top: 13%; width: 53%; height: 75%; object-fit: contain; filter: drop-shadow(0 6px 3px #30443f38); }
.ticket-edition { font-size: .66rem; }
.ticket-stub { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 1px solid #36564c88; border-left: 2px dashed #36564c88; border-radius: 0 4px 4px 0; }
.ticket-stub b { font-size: clamp(.8rem,2vw,1.15rem); }
.ticket-stub span { writing-mode: vertical-rl; font-size: .64rem; }
.ticket-stub i { width: 51%; height: 29px; background: repeating-linear-gradient(90deg,#344744 0 2px,transparent 2px 3px,#344744 3px 4px,transparent 4px 7px); }
.ticket-serial { position: absolute; z-index: 2; left: 22px; bottom: 14px; font: 650 .72rem/1 monospace; letter-spacing: .09em; }
.ticket-stamp-mark { position: absolute; right: 7px; bottom: 24px; z-index: 2; transform: rotate(-12deg); border: 2px double currentColor; border-radius: 4px; padding: 3px 5px; font: 900 .76rem/1 system-ui,sans-serif; text-transform: uppercase; color: #12634f; background: #fbefcd; }
.fresh-stamp .ticket-stamp-mark { animation: trainer-stamp .36s ease-out both; }
@keyframes trainer-stamp { from { opacity: 0; transform: translateY(-24px) rotate(-18deg) scale(1.5); } 75% { transform: rotate(-12deg) scale(.94); } }
.ticket-winner { background: repeating-linear-gradient(118deg,#ffe79e 0%,#f9c864 23%,#fff1c0 36%,#d6ab52 54%,#ffe5a5 75%); }
.ticket-winner .ticket-stamp-mark { color: #674019; }
.ticket-workspace { display: grid; gap: 18px; align-items: start; }
.ticket-workspace-current { grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); }
.ticket-workspace:not(.ticket-workspace-current) .ticket-wallet { width: min(100%, 550px); }
.ticket-panel, .ticket-win-note { min-width: 0; border: 1px solid #40494f; background: #20262c; border-radius: 14px; padding: clamp(18px,2.3vw,28px); }
.ticket-panel p { line-height: 1.5; color: #cad3d6; }
.ticket-daily, .ticket-wallet { padding: 0; overflow: hidden; }
.ticket-board-head { padding: 22px clamp(16px,2.1vw,25px) 18px; }
.ticket-board-head .ticket-kicker { color: var(--paper); }
.ticket-board-head h2 { margin: 6px 0 12px; }
.daily-progress, .stamp-tally { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.daily-progress strong, .stamp-tally strong { font-size: .95rem; }
.daily-progress > :last-child { margin-left: auto; font: 550 .83rem/1.4 Sans, sans-serif; color: var(--caption); font-variant-numeric: tabular-nums; }
.daily-progress > a:last-child { color: var(--paper); }
.daily-meter, .stamp-ink { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; }
.daily-meter { margin-top: 10px; }
.daily-meter i, .stamp-ink i { background: #414c51; border-radius: 2px; }
.daily-meter i { height: 5px; }
.daily-meter .filled { background: var(--mint); }
.ticket-claims { margin: 0 clamp(16px,2.1vw,25px); border-top: 1px solid var(--seam); }
.ticket-action { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding-block: 18px; scroll-margin-top: 12px; }
.ticket-action + .ticket-action { border-top: 1px dashed var(--seam); }
.claim-icon { width: 44px; height: 44px; display: grid; place-items: center; background: #43392a; border: 1px solid #716044; border-radius: 11px; color: var(--paper); }
.claim-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#ticket-social .claim-icon { background: #233c39; border-color: #42665e; color: var(--mint); }
#ticket-discord .claim-icon { background: #34364b; border-color: #525675; }
#ticket-discord .claim-icon img { opacity: .88; }
.claim-body { min-width: 0; }
.claim-title { display: flex; align-items: center; gap: 6px 12px; justify-content: space-between; flex-wrap: wrap; }
.ticket-value { color: var(--paper); white-space: nowrap; font: 650 .82rem/1.4 Sans, sans-serif; border: 1px solid #675c46; padding: 1px 8px; border-radius: 4px; }
.claim-body > p { margin: 4px 0 8px; font-size: 1rem; }
.claim-title + :is(.ticket-collected,.claim-actions) { margin-top: 8px; }
.claim-actions { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.claim-actions > a, .ticket-socials summary { font-weight: 650; font-size: .94rem; }
.trainer-desk button, .trainer-desk .ticket-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 15px; border: 1px solid #e6c780; border-radius: 7px; background: linear-gradient(135deg,#ffe3a1,#edc371); color: #282820; font: 740 .94rem/1.2 Sans,sans-serif; cursor: pointer; }
.trainer-desk button:hover, .trainer-desk .ticket-button:hover { filter: brightness(1.08); text-decoration: none; }
.claim-actions :is(button,.ticket-button) { min-height: 36px; border-color: #596078; background: #313647; color: #e2e6ff; }
.trainer-desk input, .trainer-desk select { width: 100%; min-width: 0; margin-top: 4px; padding: 8px; background: #181e25; color: #fff; border: 1px solid #59636e; border-radius: 5px; }
.ticket-admin, .ticket-share-link { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.ticket-share-link { margin-top: 12px; }
.ticket-share-link label { flex: 1 1 240px; }
.trainer-desk label { color: #d1d8de; font-size: .9rem; }
.ticket-collected { display: inline-flex; align-items: center; gap: 7px; color: var(--mint); font-size: .94rem; font-weight: 700; }
.ticket-collected::before { content: ''; width: 12px; height: 6px; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-2px) rotate(-45deg); }
.trainer-desk summary { cursor: pointer; font-weight: 650; }
.trainer-desk summary:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.ticket-socials summary, .draw-proof summary, .ticket-ledger summary { color: var(--paper); }
.ticket-socials div, .ticket-archive { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.ticket-socials div { margin-top: 5px; }
.ticket-socials div a { padding-block: 5px; text-decoration: underline; text-underline-offset: 3px; }
.ticket-wallet { background: linear-gradient(150deg, #293936, #202c2d 66%); border-color: #475f59; }
.ticket-wallet .ticket-kicker, .ticket-wallet .stamp-tally strong { color: var(--mint); }
.stamp-tally span { padding-left: 12px; border-left: 1px solid #60736c; font-size: .9rem; }
.stamp-book { min-width: 0; margin: 0; padding: 0 clamp(14px,2.1vw,25px) 20px; border: 0; }
.stamp-grid, .stamp-week { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; }
.stamp-week { padding-bottom: 8px; color: #b4c8c1; text-align: center; font-size: .77rem; font-weight: 650; }
.stamp-slot { display: contents; }
.stamp-slot:first-child .stamp-date { grid-column-start: var(--first-column); }
.stamp-date {
    position: relative; min-height: 42px; border: 1px solid #4b5a56; border-radius: 6px; display: grid;
    place-content: center; justify-items: center; align-content: center; gap: 4px; background: #27302f;
    color: #cddad5; font: 650 1.05rem/1 Cond, sans-serif; font-variant-numeric: tabular-nums;
}
.stamp-date.is-future { color: #a7b7b0; border: 1px dashed #42544e; background: transparent; }
.stamp-date.is-stamped { color: #c1f5df; border-color: #567b6c; background: #29483f; }
.stamp-date.is-full { color: #15392d; border-color: #a3dcc2; background: #9dd2b9; }
.stamp-date.is-today::after { content: ''; position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1px #6b5d3a; }
.stamp-date.is-today, .stamp-date:has(:checked) { border-color: var(--paper); }
.stamp-date:has(:checked) { box-shadow: inset 0 0 0 1px var(--paper); }
.stamp-date:has(input:hover) { filter: brightness(1.16); }
.stamp-date:has(:focus-visible) { outline: 2px solid white; outline-offset: 1px; }
.stamp-date input { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.stamp-ink { width: min(75%,32px); gap: 2px; position: absolute; bottom: 4px; }
.stamp-ink i { height: 3px; }
.stamp-ink .filled { background: var(--mint); }
.is-full .stamp-ink .filled { background: #346953; }
.stamp-key { grid-column: 1 / -1; grid-row: var(--key-row); display: flex; flex-wrap: wrap; gap: 5px 14px; margin-block: 5px; color: #c4d3cd; font-size: .8rem; }
.stamp-key span { display: inline-flex; align-items: center; gap: 5px; }
.stamp-key span::before { content: ''; width: 10px; height: 10px; border-radius: 2px; }
.key-today::before { border: 1px solid var(--paper); background: radial-gradient(circle at 70% 30%, var(--paper) 0 1px, transparent 2px); }
.key-some::before { border: 1px solid #567b6c; background: #29483f; }
.key-full::before { background: #9dd2b9; }
.stamp-readout { display: none; grid-column: 1 / -1; grid-row: var(--detail-row); padding: 12px 14px; border: 1px solid #465d55; border-radius: 8px; background: #1f2b28; }
.stamp-slot:has(:checked) .stamp-readout { display: block; animation: stamp-reveal .18s ease-out; }
@keyframes stamp-reveal { from { opacity: .7; transform: translateY(2px); } }
.stamp-readout > div, .stamp-readout ul { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.stamp-readout > div { justify-content: space-between; }
.stamp-readout > div span, .stamp-readout li { font-size: .86rem; color: #bdcdc6; }
.stamp-readout ul { list-style: none; padding: 0; margin: 7px 0 0; }
.stamp-readout b { margin-right: 4px; }
.stamp-readout .has-ticket { color: var(--mint); font-weight: 650; }
.stamp-sign-in, .ticket-ledger { padding: 12px clamp(14px,2.1vw,25px); border-top: 1px dashed #50665d; }
.ticket-numbers { list-style: none; margin: 12px 0 0; padding: 0; max-height: 17rem; overflow: auto; }
.ticket-numbers li { display: flex; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; padding-block: 6px; }
.ticket-numbers li + li { border-top: 1px solid #3c4d46; }
.ticket-numbers li span { color: var(--caption); font-size: .86rem; }
.draw-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 20px 0; }
.draw-facts > div { border-left: 2px solid #6b6050; padding-left: 14px; }
.draw-facts > div:nth-child(2) { border-color: #628877; }
.draw-facts > div:nth-child(3) { border-color: #73728f; }
.draw-facts p { margin-top: 6px; }
.draw-proof { border-top: 1px dashed var(--seam); padding-top: 14px; }
.draw-proof p { margin-top: 10px; max-width: 85ch; }
.ticket-winning-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; }
#winners > p, .ticket-verify, .ticket-winning-row { margin-top: 12px; }
.ticket-verify { display: grid; justify-items: start; gap: 12px; }
.ticket-verify output, .ticket-winning-row code { overflow-wrap: anywhere; }
.ticket-win-note { border-color: #c69b4c; }
.ticket-archive h2 { flex-basis: 100%; }
@media (max-width: 790px) {
    .ticket-workspace-current { grid-template-columns: 1fr; }
    .stamp-date { min-height: 44px; }
}
@media (max-width: 650px) {
    .trainer-cover { grid-template-columns: 1fr; gap: 20px; }
    .trainer-ticket { width: min(100%,440px); justify-self: center; }
    .ticket-face { min-height: 156px; }
    .ticket-action { gap: 10px; }
    .claim-icon { width: 36px; height: 36px; border-radius: 9px; }
    .claim-icon svg, .claim-icon img { width: 22px; height: 22px; }
    .draw-facts { grid-template-columns: 1fr; gap: 16px; }
    .trainer-desk button, .trainer-desk .ticket-button { min-height: 44px; }
    .ticket-socials summary, .claim-actions > a { padding-block: 7px; }
}
@media (max-width: 380px) {
    .stamp-grid, .stamp-week { gap: 3px; }
    .ticket-action { grid-template-columns: 1fr; }
    .claim-icon { display: none; }
}
