/* Festival Tycoon */
.ty-page { padding-top: 24px; padding-bottom: 48px; }
.tycoon { --ty-card: var(--panel); --ty-line: var(--line); }
.ty-hud { position: sticky; top: 64px; z-index: 30; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 12px 16px; margin-bottom: 16px; border-radius: 18px; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line); backdrop-filter: blur(12px); box-shadow: var(--shadow); }
.ty-hud__who { display: flex; gap: 10px; align-items: center; min-width: 170px; }
.ty-hud__who img { width: 38px; height: 28px; border-radius: 5px; object-fit: cover; }
.ty-hud__who strong, .ty-hud__time strong { display: block; line-height: 1.15; }
.ty-hud__who small, .ty-hud__time small { color: var(--muted); font-size: .78rem; }
.ty-hud__time { min-width: 170px; }
.ty-weeks { display: flex; gap: 2px; height: 6px; margin-top: 5px; width: 170px; }
.ty-weeks__ph { position: relative; border-radius: 3px; display: block; }
.ty-weeks__ph--selection { background: var(--cyan); } .ty-weeks__ph--prep { background: var(--pink); } .ty-weeks__ph--contest { background: var(--gold); } .ty-weeks__ph--off { background: var(--line); }
.ty-weeks__ph b { position: absolute; top: -3px; width: 4px; height: 12px; border-radius: 2px; background: #fff; box-shadow: 0 0 6px #fff; }
.ty-stat { display: grid; grid-template-columns: auto auto; gap: 0 6px; align-items: center; padding: 4px 10px; border-radius: 12px; background: var(--ink-2); }
.ty-stat span { grid-row: span 2; font-size: 1.1rem; }
.ty-stat strong { font-variant-numeric: tabular-nums; line-height: 1.1; }
.ty-stat small { color: var(--muted); font-size: .68rem; line-height: 1.1; }
.ty-stat.is-bad strong { color: var(--red); }
.ty-hud__ctrl { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.ty-hud__ctrl select { width: auto; min-height: 34px; padding: 4px 8px; }
.ty-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .ty-layout { grid-template-columns: 1fr; } .ty-hud { position: static; } .ty-hud__ctrl { margin-left: 0; } }
.ty-tabs { display: grid; gap: 4px; position: sticky; top: 160px; }
@media (max-width: 860px) { .ty-tabs { display: flex; overflow-x: auto; position: static; padding-bottom: 4px; } .ty-tab { white-space: nowrap; } }
.ty-tab { text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text); font: 600 .92rem/1.2 var(--font-body); cursor: pointer; }
.ty-tab:hover { background: var(--panel); }
.ty-tab.is-on { background: var(--panel); border-color: var(--pink); box-shadow: inset 3px 0 0 var(--pink); }
.ty-main { display: grid; gap: 16px; min-width: 0; }
.ty-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ty-card { padding: 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.ty-card h3 { margin-top: 0; }
.ty-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ty-phase { margin-top: 0; }
.ty-flag { width: 22px; height: 16px; border-radius: 3px; object-fit: cover; vertical-align: -2px; }
.ty-todo { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.ty-todo li { display: flex; gap: 8px; color: var(--muted); }
.ty-todo li span { width: 18px; text-align: center; }
.ty-todo li.is-ok { color: var(--green); }
.ty-entry { margin: 0; font-size: 1.05rem; }
.ty-skills { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 10px 0; align-items: center; font-size: .85rem; }
.ty-skills dt { color: var(--muted); text-transform: capitalize; }
.ty-skills dd { margin: 0; display: grid; grid-template-columns: 1fr 28px; gap: 8px; align-items: center; }
.ty-skills dd b { text-align: right; font-variant-numeric: tabular-nums; }
.ty-bar { display: block; height: 8px; border-radius: 99px; background: var(--ink-2); overflow: hidden; min-width: 60px; }
.ty-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pink), var(--gold)); }
.ty-money { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0 0 10px; }
.ty-money dt { color: var(--muted); } .ty-money dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.ty-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 380px; overflow-y: auto; }
.ty-log li { padding: 6px 10px; border-radius: 10px; background: var(--ink-2); font-size: .9rem; }
.ty-log li small { display: block; color: var(--faint); font-size: .72rem; }
.ty-log li.is-good { box-shadow: inset 3px 0 0 var(--green); } .ty-log li.is-bad { box-shadow: inset 3px 0 0 var(--red); }
.ty-tip { margin: 0; color: var(--muted); font-size: .9rem; }
.ty-artist { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); }
.ty-artist.is-star { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 10px 30px -14px var(--gold); }
.ty-artist__head { display: flex; gap: 10px; align-items: center; }
.ty-artist__head small { display: block; color: var(--muted); font-size: .8rem; }
.ty-avatar { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--cyan)); color: #fff; font-weight: 800; }
.ty-artist .ty-skills { margin: 0; }
.ty-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.ty-form label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
.ty-inline { display: inline-flex; gap: 8px; align-items: center; margin-top: 10px; }
.ty-inline select { width: auto; }
.ty-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ty-table th { text-align: left; color: var(--muted); font-size: .78rem; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.ty-table td { padding: 8px; border-bottom: 1px solid var(--line-soft); }
.ty-table tr.is-win td { background: rgba(255, 200, 61, .12); }
.ty-table small { color: var(--muted); }
.ty-genres { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ty-genre { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--ink-2); }
.ty-genre small { color: var(--muted); }
.ty-genre.is-trend { box-shadow: inset 0 0 0 2px var(--gold); }
.ty-sel { display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); }
.ty-sel p { margin: 0; }
.ty-sel.is-done { opacity: .6; }
.ty-staging { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ty-stg { display: grid; gap: 4px; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-2); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
.ty-stg:hover:not([disabled]) { border-color: var(--pink); transform: translateY(-2px); }
.ty-stg[disabled] { cursor: default; opacity: .7; }
.ty-stg.is-on { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: rgba(61, 220, 151, .08); }
.ty-stg.is-misfit { opacity: .75; }
.ty-stg__icon { font-size: 1.5rem; }
.ty-stg small { color: var(--muted); font-size: .8rem; }
.ty-stg em { font-style: normal; font-size: .78rem; font-weight: 700; color: var(--gold); }
.ty-bad { color: var(--red); font-weight: 600; }
.ty-levels { display: flex; gap: 4px; }
.ty-levels i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.ty-levels i.is-on { background: var(--green); }
.ty-field { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ty-field__item { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--ink-2); }
.ty-field__item img { width: 30px; height: 22px; border-radius: 4px; object-fit: cover; }
.ty-field__item span { min-width: 0; display: grid; }
.ty-field__item small { color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ty-ach { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.ty-ach__item { display: grid; gap: 2px; justify-items: center; text-align: center; padding: 14px 10px; border-radius: 14px; background: var(--ink-2); opacity: .5; }
.ty-ach__item.is-on { opacity: 1; box-shadow: inset 0 0 0 1px var(--gold); }
.ty-ach__icon { font-size: 1.8rem; }
.ty-ach__item small { color: var(--muted); font-size: .78rem; }
.ty-ach__item em { font-style: normal; font-size: .72rem; color: var(--gold); }
.ty-code { font-family: ui-monospace, monospace; font-size: .75rem; word-break: break-all; }
.ty-slots { display: grid; gap: 8px; margin-bottom: 10px; }
.ty-slot { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--ink-2); }
.ty-slot.is-on { box-shadow: inset 0 0 0 2px var(--pink); }
@media (max-width: 600px) { .ty-slot { grid-template-columns: 1fr; } }
.ty-total { font-size: 1.1rem; }
/* title screen */
.ty-start { display: grid; gap: 18px; max-width: 760px; margin: 0 auto; }
.ty-start__hero { text-align: center; }
.ty-start__logo { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 26px; font-size: 2.6rem; background: linear-gradient(135deg, var(--gold), var(--pink)); box-shadow: 0 20px 50px -18px var(--pink); }
.ty-start__hero h1 { margin: 14px 0 6px; }
.ty-start__hero .lead { margin-inline: auto; }
.ty-start__flag { width: 42px; height: 31px; border-radius: 5px; object-fit: cover; }
.ty-start .row select { flex: 1; }
.ty-continue { text-align: center; }
.ty-new h2 { margin-top: 0; }
.ty-new .btn--lg { margin-top: 14px; }
.ty-privacy { text-align: center; }
/* modal and scoreboard */
.ty-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(8, 4, 24, .72); backdrop-filter: blur(4px); animation: ty-fade .2s; }
.ty-modal__box { width: min(720px, 100%); max-height: 92vh; overflow: auto; padding: 22px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ty-modal__box h2 { margin-top: 0; }
.ty-modal__actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.ty-headline { font: 800 1.3rem/1.2 var(--font-display); color: var(--gold); }
.ty-board__head, .ty-board__row { display: grid; grid-template-columns: 32px 30px 1fr 48px 48px 56px; gap: 8px; align-items: center; }
.ty-board__head.no-jury, .ty-board.no-jury .ty-board__row { grid-template-columns: 32px 30px 1fr 48px 56px; }
.ty-board__head { font-size: .72rem; color: var(--muted); padding: 0 10px 4px; }
.ty-board { display: grid; gap: 4px; }
.ty-board__row { padding: 6px 10px; border-radius: 10px; background: var(--ink-2); animation: ty-in .35s both; }
.ty-board__row img { width: 30px; height: 22px; border-radius: 4px; object-fit: cover; }
.ty-board__row.is-me { background: linear-gradient(90deg, rgba(255, 61, 139, .35), rgba(255, 61, 139, .08)); box-shadow: inset 0 0 0 1px var(--pink); }
.ty-board__row.is-win { box-shadow: inset 0 0 0 2px var(--gold); }
.ty-board__pl { font-weight: 800; text-align: center; }
.ty-board__name { display: grid; min-width: 0; line-height: 1.2; }
.ty-board__name small { color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ty-board__j { color: var(--gold); text-align: right; font-variant-numeric: tabular-nums; }
.ty-board__t { color: var(--cyan); text-align: right; font-variant-numeric: tabular-nums; }
.ty-board__tot { text-align: right; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
@keyframes ty-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ty-fade { from { opacity: 0; } to { opacity: 1; } }
:root[data-theme="light"] .ty-hud__ctrl select, :root[data-theme="light"] .ty-board__j { color: #7a5600; }
:root[data-theme="light"] .ty-board__t { color: #00668c; }
:root[data-theme="light"] .ty-stg em, :root[data-theme="light"] .ty-ach__item em { color: #8a5a00; }
