/* The knowledge economy: a bright, compact, classic idle-tycoon board. */
:root {
  --paper: #e6ebdd; --card: #fffdf1; --card-2: #f1f1dc; --card-3: #dce3c8;
  --ink: #233c31; --ink-2: #4a6251; --ink-3: #657766;
  --line: #b7c5a9; --line-2: #d4ddc5;
  --rail: #173b30; --rail-deep: #102a23; --rail-item: #254a3a;
  --rail-hover: #355f45; --rail-text: #fff8da; --rail-muted: #c3d1b1; --rail-label: #baca9e;
  --accent: #f5c34c; --accent-hover: #ffdc72; --accent-deep: #987022; --accent-text: #373a23;
  --brick: #c7683b; --brick-hover: #b8562d; --brick-ink: #713820; --brick-wash: #faebd6;
  --tan: #e2e3cc; --tan-deep: #b4bea1;
  --radius: 10px; --radius-sm: 7px; --radius-dialog: 16px;
  --shadow: 0 4px 0 #203b301c; --shadow-lg: 0 14px 48px #122a3540;
  --scrim: #102d27d9;
}
body.tycoon {
  background: repeating-linear-gradient(135deg, #ffffff10 0 12px, #b2c3a111 12px 24px), var(--paper);
  background-attachment: fixed;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #22724a; outline-offset: 3px; }
.rail button:focus-visible, .rail a:focus-visible, .rail summary:focus-visible { outline-color: #ffe08a; }
.btn { border-radius: 7px; min-height: 42px; font-size: 17px; box-shadow: 0 3px 0 #9cae8c; border-color: #a4b494; background: #fffdf1; }
.btn.primary { background: linear-gradient(#ffdb6d, #f2bc3e); border-color: #a57b25; color: #393920; box-shadow: inset 0 2px 0 #ffeaa0, 0 3px 0 #96702a; }
.btn.primary:hover { background: linear-gradient(#ffe794, #ffd15d); }
.btn.brick { background: linear-gradient(#de8b4b, #bd6038); color: white; border-color: #8d4828; box-shadow: 0 3px 0 #864125; }
.btn:disabled, .btn:disabled:hover { background: #e3e5d2; color: #667058; border-color: #b7bea1; box-shadow: inset 0 1px 0 #f7f7ed, 0 3px 0 #b7bea1; opacity: 1; }
.btn.small { border-radius: 6px; font-size: 15px; min-height: 38px; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn:active, .btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #96702a; }
.rail { width: 222px; padding: 20px 14px; border-right: 4px solid #b8aa66; background: radial-gradient(ellipse at 50% 0, #46704c 0, transparent 50%), #193e31; scrollbar-width: thin; scrollbar-color: #6d8960 transparent; }
.rail-brand { margin: 2px 0 16px; }
.rail-brand .wordmark { max-width: 185px; padding: 5px 0; transform: rotate(-3deg); }
.rail-brand .wordmark-max { font-size: 47px; letter-spacing: -2px; color: #ffdb68; -webkit-text-stroke: 3px #142f23; filter: drop-shadow(0 3px 0 #142f23); }
.rail-brand .wordmark-sub { font-size: 25px; color: #fffbdb; -webkit-text-stroke: 2px #142f23; margin-top: 6px; }
.wordmark::after { height: 3px; background: #d9b64d; }
.wordmark-cap { display: none; }
.rail-brand small { font-size: 8px; letter-spacing: 1.9px; color: #c1cda3; margin-top: 7px; }
.rail-player { border: 1px solid #738256; border-radius: 10px; background: radial-gradient(ellipse at 50% 30%, #e0d696 0, #9baf79 70%); color: #233c31; padding: 12px 8px 8px; gap: 4px; box-shadow: 0 4px 0 #0d2c22; }
.rail-player:hover { background: radial-gradient(ellipse at 50% 30%, #f3e8af 0, #a5b685 70%); }
.rail-player .avatar { --size: 112px; }
.rail-player-name strong { font-size: 24px; text-shadow: 0 1px #fff6d7; }
.rail-player-name span { font: 600 11px var(--font); color: #3a513c; }
.rail-player .avatar-tag { display: none; }
.rail-label { font-size: 9px; letter-spacing: 2px; margin: 9px 0; padding-left: 4px; color: #ced7b7; }
.rail-tabs { gap: 7px; }
.rail-tabs button { min-height: 44px; padding: 9px 12px; border-radius: 6px; background: #2b503d; border: 1px solid #63815a66; color: #f9f5df; font-size: 18px; box-shadow: 0 3px 0 #0e2d22; }
.rail-tabs button:hover { background: #3b6548; }
.rail-tabs button .icon { width: 20px; height: 20px; color: #cbdca7; }
.rail-tabs button[aria-selected="true"] { color: #293924; background: linear-gradient(#ffdc70, #eebc48); border-color: #e8c477; box-shadow: inset 0 1px #fff0b1, 0 3px 0 #957026; }
.rail-tabs button[aria-selected="true"] .icon { color: #36492b; }
.rail-tabs .key { font-size: 9px; color: #c6d2b3; }
.course-directory { margin-top: 4px; font-size: 11px; color: #e2e7c9; }
.course-directory summary { cursor: pointer; padding: 8px 3px; font-weight: 600; }
.rail-courses { margin-top: 8px; gap: 2px; }
.rail-courses button { font-size: 12px; min-height: 30px; padding: 4px 6px; background: transparent; border: 0; box-shadow: none; }
.rail-courses .course-count { font-size: 9px; color: #cbd5b6; }
.rail-site { margin-top: 18px; font-size: 10px; }
.rail-site a { color: #d4dfc2; }
.shell { margin-left: 222px; }
.header, body:not([data-tab="business"]) .header { position: relative; top: auto; display: block; padding: 0; min-height: 0; background: #faf8e7; border-bottom: 3px solid #a9b794; }
.empire-topline { min-height: 43px; padding: 7px 28px; display: flex; align-items: center; gap: 12px; color: #55704d; border-bottom: 1px solid #d7dfc8; font-size: 10px; font-weight: 700; letter-spacing: 1.6px; }
.save-indicator { margin-left: auto; font-size: 9px; letter-spacing: 0; font-weight: 400; color: #58704f; }
.save-indicator::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #599d58; }
.empire-topline .icon-btn { width: 28px; min-height: 28px; height: 28px; padding: 0; border-radius: 50%; font-size: 15px; box-shadow: none; }
.wallet-board { margin: 20px 28px 16px; display: flex; align-items: stretch; gap: 25px; }
.wallet-main { position: relative; display: flex; align-items: center; gap: 18px; flex: 1; padding: 17px 28px 18px; min-width: 0; color: #fff9d9; border: 3px solid #2d5d3c; border-radius: 11px; background: repeating-linear-gradient(135deg, #ffffff05 0 13px, transparent 13px 26px), linear-gradient(130deg, #40784b, #244e36); box-shadow: inset 0 2px 0 #81a565, 0 4px 0 #b6c49b; }
.wallet-icon { display: grid; place-items: center; flex: none; width: 63px; height: 63px; background: #efbc46; color: #745424; border: 3px solid #fff1a1; outline: 3px solid #bd9433; border-radius: 50%; box-shadow: 0 4px 0 #1d3d2a; transform: rotate(-12deg); }
.wallet-icon .icon { width: 35px; height: 35px; }
.wallet-label { display: block; font-size: 9px; font-weight: 600; letter-spacing: 2.2px; }
.wallet-main .wallet-label { color: #d7e2b6; }
.cash { margin: 4px 0; font-size: clamp(32px, 3.7vw, 54px); font-weight: 800; line-height: 1.08; color: #fff6d0; letter-spacing: -1px; text-shadow: 0 3px 0 #193f29; overflow-wrap: anywhere; }
.wallet-motto { display: block; font-size: 10px; color: #e2e8bf; }
.wallet-side { flex: none; min-width: 205px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.income-stat { padding-bottom: 12px; border-bottom: 1px solid #c8d2b7; }
.wallet-side .wallet-label { color: #657957; }
.cash-rate { margin-top: 2px; font-size: 27px; color: #37693d; }
.credit-stat { display: flex; align-items: center; gap: 8px; color: #77632f; }
.credit-stat .icon { width: 24px; height: 24px; }
.credits-pill { font-size: 17px; color: #5b663e; }
.empire-status { display: flex; align-items: center; gap: 24px; padding: 10px 28px; min-height: 43px; background: #e9edda; border-top: 1px solid #d4ddc1; color: #53674d; font-size: 10px; font-weight: 600; flex-wrap: wrap; }
.empire-status-item { display: inline-flex; align-items: center; gap: 7px; }
.empire-status-item .icon { width: 16px; height: 16px; }
.flame { border: 0; padding: 0; background: transparent; font-size: 14px; gap: 5px; margin-left: auto; }
.flame small { font: 600 9px var(--font); letter-spacing: 1px; }
.chip, .flame { border-radius: 5px; }
.timer-strip { gap: 6px; }
.timer-strip:empty { display: none; }
.timer-strip .chip { font-size: 11px; padding: 3px 7px; }
.columns { display: block; }
.main { padding: 26px 28px 55px; }
.campus-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 20px; }
.campus-title .section-label { font: 700 9px var(--font); letter-spacing: 2px; margin-bottom: 4px; color: #667758; }
.campus-title h2 { font-size: 32px; color: #2e5039; }
.campus-title p { font-size: 11px; margin: 4px 0 0; color: #607056; }
.market-badge { font-size: 8px; font-weight: 700; letter-spacing: 1px; border: 1px solid #aabd95; border-radius: 20px; background: #edf2df; padding: 7px 10px; white-space: nowrap; }
.market-badge i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #5e8f45; }
.empire-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 9px 12px; border: 1px solid #becbb0; background: #f6f6e8; border-radius: 7px; box-shadow: 0 2px 0 #cbd5bd; }
.toolbar-label { font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.buy-selector { display: flex; gap: 4px; }
.buy-selector button { min-width: 42px; min-height: 31px; padding: 4px 10px; border: 1px solid #b3c0a0; border-radius: 4px; font: 700 13px var(--font-display); background: #e8edd9; color: #39523b; }
.buy-selector button[aria-pressed="true"] { background: #3c6a45; border-color: #285435; color: #fff9d8; box-shadow: inset 0 1px 0 #82a074; }
.buy-selector button:disabled { color: #6d775f; background: #e8e8d8; border-style: dashed; cursor: not-allowed; }
.manager-shortcut { margin-left: auto; border: 0; background: transparent; color: #3e6844; font-size: 10px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; padding: 5px 0; }
.manager-shortcut .icon { width: 18px; height: 18px; }
.business-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; align-items: start; }
.biz { position: relative; display: grid; grid-template-columns: 86px minmax(0, 1fr) 102px; grid-template-rows: auto 40px auto; gap: 6px 10px; padding: 12px 12px 11px 8px; min-height: 143px; border: 2px solid #afbd9c; border-radius: 9px; background: #fffcdf; box-shadow: inset 0 2px #fffff3, 0 4px 0 #b6c5a4; overflow: visible; transition: border-color .15s; }
.biz:hover { border-color: #829a6e; box-shadow: inset 0 2px #fffff3, 0 4px 0 #aebf9b; }
.biz > *:not(.biz-click) { pointer-events: auto; }
.biz-art { grid-column: 1; grid-row: 1 / 4; width: 86px; height: 103px; min-height: 0; padding: 0 3px 10px; align-self: center; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 42%, #faf8c3 0 48%, #c2ce9d 49% 53%, transparent 54%); border-radius: 0; overflow: visible; }
.biz-art img { width: 84px; max-width: 84px; max-height: 83px; object-fit: contain; filter: drop-shadow(0 3px 0 #56654533); }
.owned-badge { position: absolute; left: 6px; right: 6px; bottom: -1px; display: flex; flex-direction: column; align-items: center; padding: 1px 3px 3px; color: #fffce4; background: #3e6440; border: 2px solid #779063; border-radius: 5px; box-shadow: 0 2px 0 #9aaa81; line-height: 1; }
.owned { font: 800 23px/1 var(--font-display); }
.owned-badge small { font: 600 7px/1.2 var(--font); letter-spacing: 1.5px; }
.biz-head { grid-column: 2 / 4; grid-row: 1; display: flex; align-items: center; flex-wrap: nowrap; gap: 5px; min-height: 39px; }
.biz-titles { min-width: 0; }
.biz-name { font: 800 20px/1.08 var(--font-display); color: #2f4b32; }
.biz-course { font: 600 9px/1.5 var(--font); color: #73805b; }
.biz-mult { margin-left: auto; max-width: 85px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 10px var(--font); color: #43653a; background: #e5ecd0; border: 1px solid #bac9a3; padding: 3px 7px; border-radius: 4px; }
.biz-barrow { grid-column: 2; grid-row: 2; display: block; min-width: 0; }
.biz-click, .biz-click:disabled, .biz-click:hover { position: relative; inset: auto; display: block; width: 100%; height: 40px; min-height: 40px; padding: 0; background: #b4cc8a; border: 2px solid #5c7e44; border-radius: 5px; box-shadow: inset 0 2px 0 #e2edb8, 0 2px 0 #819b63; color: #243b22; text-shadow: none; overflow: hidden; transform: none; }
.biz-click:not(:disabled):hover { border-color: #335c37; background: #a7c67c; }
.biz-click:not(:disabled):active { transform: translateY(1px); }
.biz-click .bar { position: absolute; inset: 0; height: 100%; border: 0; border-radius: 0; background: transparent; box-shadow: none; pointer-events: none; }
.biz-click .bar > i { border-radius: 0; background: linear-gradient(#94ca65, #63a24b); box-shadow: inset 0 2px #b6e283; }
.bar.running > i { animation: tycoon-shine 2.2s linear infinite; background: repeating-linear-gradient(120deg, #76b854 0 18px, #8ac663 18px 36px); background-size: 84px 100%; }
.production-label { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 9px; height: 100%; pointer-events: none; }
.biz-pay { font: 800 18px/1 var(--font-display); color: #233e24; white-space: nowrap; }
.run-label { font: 700 8px/1 var(--font); white-space: nowrap; }
.biz-actions { grid-column: 3; grid-row: 2; display: flex; flex-direction: column; gap: 0; align-items: stretch; }
.biz-actions .btn { width: 100%; min-height: 40px; height: 40px; padding: 3px 4px; border-radius: 5px; display: flex; flex-direction: column; gap: 0; font: 800 17px/1.1 var(--font-display); }
.biz-actions .btn .sub { font: 600 9px/1.4 var(--font); white-space: nowrap; }
.biz-actions .btn.brick .icon { display: none; }
.biz-actions .btn.brick { font-size: 15px; }
.biz-actions .btn.brick .sub { font-size: 8px; }
.biz-footer { grid-column: 2 / 4; grid-row: 3; display: flex; align-items: center; gap: 8px; min-width: 0; padding-top: 2px; }
.biz-portrait { display: block; width: auto; height: auto; min-width: 0; margin-right: auto; }
.biz-portrait button { display: flex; align-items: center; gap: 4px; width: auto; max-width: 125px; height: 25px; min-height: 25px; padding: 0; border: 0; border-radius: 3px; background: transparent; color: #577444; font: 600 8px var(--font); overflow: visible; }
.manager-face { width: 19px; height: 22px; overflow: hidden; border-radius: 50%; background: #e5e9c9; flex: none; }
.biz-portrait .faculty-sprite { width: 20px; height: 30px; transform: scale(1.25); }
.manager-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cycle-time, .nextgate { font-size: 8px; color: #6d7b58; white-space: nowrap; }
.nextgate { margin-left: auto; border-left: 1px solid #ccd4b2; padding-left: 7px; }
.biz.is-gated { border-color: #be8c43; box-shadow: 0 4px 0 #c6ad74; }
.biz.is-gated .nextgate { color: #945a26; font-weight: 700; }
.business-complete { text-align: center; font: 700 13px var(--font-display); color: #557e39; padding-top: 10px; }
.biz.is-locked-business { background: #eaf0dd; border-color: #becbad; box-shadow: inset 0 2px #f9fbed, 0 4px 0 #c7d2b8; }
.biz.is-locked-business .biz-art img { opacity: .65; filter: saturate(.5); }
.biz.is-locked-business .owned-badge { background: #859971; border-color: #a9b798; }
.biz.is-locked-business .biz-name { color: #66785b; }
.biz.is-affordable { background: #f4f4d9; border-color: #b3b979; }
.biz.is-affordable .biz-art img { opacity: 1; filter: none; }
.biz-unlock { grid-column: 2 / 4; grid-row: 2 / 4; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
.unlock-message { font-size: 10px; color: #6c7a59; max-width: 90px; }
.biz-unlock .btn { display: flex; flex-direction: column; gap: 1px; min-width: 143px; min-height: 44px; font: 800 15px/1.1 var(--font-display); border-radius: 5px; padding: 5px 8px; }
.unlock-cost { font: 600 11px var(--font); }
.biz.is-producing .biz-art img { animation: tycoon-production 2.6s ease-in-out infinite; }
.floaters { left: 100px; top: 25px; pointer-events: none !important; z-index: 5 !important; }
.floater { color: #33763f; text-shadow: 0 1px #ffffe5; }
.empire-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 25px; padding-top: 15px; border-top: 1px solid #c2ceb1; color: #6d7d61; font-size: 9px; }
body[data-tab="business"] .campus-guide { display: none; }
body:not([data-tab="business"]) .panel { padding: 26px 28px 60px; }
body:not([data-tab="business"]) .panel-inner { background: transparent; border: 0; border-radius: 0; }
.panel h2 { font-size: 34px; color: #31583d; }
.panel .panel-sub { margin: 6px 0 23px; color: #617654; font-size: 12px; }
.item, .pu-card, .faculty-grid .item.faculty, .stat-grid .cell { background: #fffbea; border: 2px solid #b8c6a6; border-radius: 9px; box-shadow: 0 3px 0 #c5d0b5; }
.item b, .pu-head b, .faculty-grid .faculty .who b { color: #34573c; }
.item .desc, .pu-q, .faculty-grid .faculty .bio { color: #607352; }
.faculty-grid .faculty .portrait { background: radial-gradient(ellipse, #e4e6b1, #f6f3dc 70%); border-radius: 7px; }
.faculty-grid .faculty .biz-line { background: #e8eed9; border-color: #c1cba9; color: #516846; }
.faculty-grid .item.faculty.is-bought { background: #e4ead9; }
.filters .btn[aria-pressed="true"] { background: #3b6b44; border-color: #284e32; color: #fff7db; box-shadow: 0 3px 0 #274c33; }
.pu-art { background: #e9edcb; }
.chip.ink { background: #2d583d; color: #f7f5d7; border-color: #56754a; }
input, select, textarea { border-color: #acbd9d; background: #fffef4; border-radius: 6px; }
input[type="checkbox"] { accent-color: #3c754a; }
.dialog { border: 3px solid #789362; border-radius: 14px; background: #fffcec; box-shadow: 0 8px 0 #183a2840, 0 24px 80px #10271c66; }
.dialog-head { border-color: #d1daba; padding-right: 22px; }
.dialog-head b { font-size: 26px; color: #32563b; }
.dialog .format-help { color: #65794f; background: #edf1db; padding: 10px; border-radius: 5px; }
.toast { border: 2px solid #93a878; border-radius: 9px; background: #fffbe3; }
.toast b { color: #35563b; }
@keyframes tycoon-production { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-3px) rotate(1deg); } }
@keyframes tycoon-shine { to { background-position: 84px 0; } }
@media (max-width: 1250px) and (min-width: 901px) {
  .business-list { grid-template-columns: 1fr; }
  .biz { grid-template-columns: 92px minmax(0, 1fr) 135px; min-height: 132px; }
  .biz-name { font-size: 22px; }
  .biz-portrait button { max-width: none; font-size: 10px; }
  .cycle-time, .nextgate { font-size: 10px; }
  .wallet-side { min-width: 170px; }
  .wallet-main { padding: 16px 20px; }
  .wallet-icon { width: 48px; height: 48px; }
  .cash-rate { font-size: 22px; }
}
@media (max-width: 900px) {
  .rail { position: relative; width: auto; padding: 10px 12px 0; border-right: 0; border-bottom: 3px solid #bcab69; }
  .rail-brand, .course-directory, .rail-label, .rail-bottom, .rail-site { display: none; }
  .rail-player { width: auto; margin: 0 0 8px; padding: 3px 10px 3px 4px; display: inline-flex; flex-direction: row; border-color: #637b50; background: #2a4d37; color: #fff4d1; box-shadow: none; gap: 8px; }
  .rail-player:hover { background: #3c6041; }
  .rail-player .avatar { --size: 29px; }
  .rail-player-name { display: flex; gap: 10px; align-items: center; }
  .rail-player-name strong { font-size: 16px; text-shadow: none; }
  .rail-player-name span { font-size: 10px; color: #d4dfb9; }
  .rail-tabs { flex-direction: row; padding-bottom: 10px; gap: 6px; margin-bottom: 0; }
  .rail-tabs button { min-height: 37px; padding: 7px 11px; font-size: 14px; }
  .rail-tabs button .icon { width: 16px; height: 16px; }
  .shell { margin-left: 0; }
  .empire-topline { min-height: 37px; padding: 6px 16px; font-size: 9px; letter-spacing: 1px; }
  .wallet-board { margin: 14px 16px; gap: 16px; }
  .wallet-main { padding: 15px 18px; gap: 14px; }
  .wallet-icon { width: 47px; height: 47px; }
  .wallet-icon .icon { width: 28px; height: 28px; }
  .cash { font-size: 37px; }
  .wallet-side { min-width: 175px; }
  .cash-rate { font-size: 23px; }
  .empire-status { padding: 9px 16px; gap: 16px; }
  .main { padding: 23px 16px 35px; }
  .business-list { grid-template-columns: 1fr; gap: 13px; }
  .biz { grid-template-columns: 86px minmax(0,1fr) 120px; min-height: 134px; }
  .biz-name { font-size: 22px; }
  .biz-portrait { display: block; }
  .biz-portrait button { max-width: none; font-size: 10px; }
  .cycle-time, .nextgate { font-size: 9px; }
  .panel { max-height: 88dvh; border-color: #678456; border-radius: 14px 14px 0 0; background: #eaf0dd; }
  body:not([data-tab="business"]) .panel { padding: 0; }
  body:not([data-tab="business"]) .panel-inner { padding: 20px 16px 30px; }
  .panel-sheet-handle { background: #f5f5df; border-radius: 14px 14px 0 0; border-color: #bdcba7; }
}
@media (max-width: 580px) {
  .save-indicator { display: none; }
  .empire-topline .icon-btn { margin-left: auto; }
  .wallet-board { margin: 10px 12px 12px; display: block; }
  .wallet-main { padding: 12px 16px; gap: 16px; }
  .cash { font-size: 37px; margin: 3px 0; }
  .wallet-motto { font-size: 9px; }
  .wallet-side { margin-top: 12px; flex-direction: row; gap: 10px; align-items: center; justify-content: space-between; }
  .income-stat { border: 0; padding: 0; }
  .wallet-label { font-size: 8px; letter-spacing: 1.4px; }
  .cash-rate { font-size: 21px; line-height: 1.1; }
  .credits-pill { font-size: 15px; }
  .empire-status { padding: 8px 12px; gap: 12px; font-size: 8px; }
  .empire-status-item { gap: 4px; }
  .flame { font-size: 12px; }
  .flame small { font-size: 7px; }
  .main { padding: 19px 10px 30px; }
  .campus-title { margin: 0 3px 14px; }
  .campus-title .section-label { font-size: 7px; letter-spacing: 1.4px; }
  .campus-title h2 { font-size: 27px; }
  .campus-title p { font-size: 9px; }
  .market-badge { display: none; }
  .empire-toolbar { gap: 8px; padding: 8px; margin-bottom: 15px; flex-wrap: wrap; }
  .toolbar-label { font-size: 8px; }
  .buy-selector { flex: 1; justify-content: flex-end; gap: 3px; }
  .buy-selector button { min-width: 34px; min-height: 34px; font-size: 12px; padding: 4px 8px; }
  .manager-shortcut { display: none; }
  .biz { grid-template-columns: 66px minmax(0,1fr) 86px; grid-template-rows: auto 39px auto; min-height: 126px; gap: 5px 7px; padding: 10px 8px 9px 5px; border-radius: 8px; }
  .biz-art { width: 66px; height: 87px; padding: 0 0 10px; }
  .biz-art img { width: 64px; max-width: 64px; max-height: 66px; }
  .owned-badge { left: 3px; right: 3px; }
  .owned { font-size: 20px; }
  .owned-badge small { font-size: 6px; }
  .biz-head { min-height: 35px; }
  .biz-name { font-size: 18px; }
  .biz-course { font-size: 8px; }
  .biz-mult { font-size: 8px; padding: 2px 4px; max-width: 55px; }
  .biz-click, .biz-click:disabled, .biz-click:hover { height: 39px; min-height: 39px; }
  .production-label { padding: 0 6px; gap: 3px; }
  .biz-pay { font-size: 16px; }
  .run-label { font-size: 7px; }
  .biz-actions .btn { height: 39px; min-height: 39px; font-size: 16px; }
  .biz-actions .btn .sub { font-size: 8px; }
  .biz-footer { gap: 4px; }
  .manager-face { display: none; }
  .biz-portrait button { max-width: 92px; font-size: 8px; height: 21px; min-height: 21px; }
  .cycle-time, .nextgate { font-size: 7px; }
  .nextgate { padding-left: 4px; }
  .biz-unlock .btn { min-width: 120px; font-size: 13px; min-height: 43px; }
  .unlock-message { max-width: 80px; font-size: 9px; }
  .empire-footer { flex-direction: column; gap: 3px; font-size: 8px; margin-top: 20px; }
  .dialog { padding: 18px 16px; }
  .dialog-head b { font-size: 22px; }
  .faculty-grid .faculty .who b { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .biz.is-producing .biz-art img, .bar.running > i { animation: none; }
}
body.reduced-motion .biz.is-producing .biz-art img, body.reduced-motion .bar.running > i { animation: none; }

.variable-note { display: block; margin-top: 12px; font-size: 12px; color: #5b704d; }

/* Keep long names and late-game prices inside the manager cards. */
.faculty-grid .faculty .btn { flex-direction: column; gap: 2px; padding: 7px; font-size: 21px; min-width: 0; height: auto; }
.faculty-grid .faculty .btn .sub { font-size: 12px; overflow-wrap: anywhere; }
.faculty-grid .faculty .who small { color: #6b7d4c; }
.pu-card .pu-effect { color: #4f743f; }
.field, .check { background: #f7f8e9; border-color: #c4d0b0; border-radius: 8px; }
@media (max-width: 580px) {
  .faculty-grid .faculty .btn { font-size: 18px; }
  .faculty-grid .faculty .btn .sub { font-size: 11px; }
}

/* The redesigned cast gets a proper portrait at small sizes and a complete
   silhouette in the roster. Every view clips the same cached illustration. */
.tycoon-portrait { display: block; width: 100%; height: 100%; overflow: hidden; }
.manager-face { width: 24px; height: 24px; background: #f6edce; border: 1px solid #ad9d5c; }
.biz-portrait .manager-face .tycoon-portrait { width: 100%; height: 100%; }
.dialog-head .portrait { width: 56px; height: 56px; border-color: #a99449; background: #f5eccd; }
.dialog-head .portrait .tycoon-portrait { width: 100%; height: 100%; }
.faculty-grid .item.faculty { padding: 10px 12px 16px; gap: 10px; border-radius: 12px; border: 2px solid #a8b892; overflow: hidden; }
.faculty-grid .faculty .portrait {
  position: relative; height: 250px; border-radius: 7px; border-bottom: 3px solid #c6a758;
  background: radial-gradient(ellipse at 50% 44%, #fff9dc 0 33%, #e6e5bf 65%, #d7dfbd 100%);
  box-shadow: inset 0 0 0 1px #fff8d2; isolation: isolate;
}
.faculty-grid .faculty .portrait::before {
  content: ''; position: absolute; inset: 12px; border: 1px solid #c6b57266;
  border-radius: 50% 50% 7px 7px; z-index: -1;
}
.faculty-grid .faculty .portrait .tycoon-character {
  display: block; width: 100%; height: 100%; max-width: 230px;
  overflow: hidden; filter: drop-shadow(0 4px 2px #253c2526);
  transform-origin: 50% 92%; transition: transform .22s ease, filter .22s ease;
}
.faculty-grid .faculty:hover .tycoon-character { transform: translateY(-3px) rotate(-1deg); filter: drop-shadow(0 7px 3px #253c2526); }
.faculty-grid .faculty.is-bought .portrait { filter: none; }
.faculty-grid .faculty .who { min-height: 68px; display: flex; flex-direction: column; justify-content: center; }
.faculty-grid .faculty .who b { font-size: 26px; line-height: 1.06; }
.faculty-grid .faculty .who small { font-size: 16px; margin-top: 5px; }
.faculty-grid .faculty .biz-line { min-height: 48px; padding: 6px; border-radius: 6px; font-size: 14px; }
.faculty-grid .faculty .bio { margin: 0; padding-top: 9px; border-color: #c5ceb2; }
.rail-player { border: 2px solid #c3ad64; box-shadow: inset 0 0 0 3px #e3dfaf55, 0 4px 0 #0d2c22; }
.rail-player .avatar > svg { filter: drop-shadow(0 3px 1px #29463122); }
@media (max-width: 600px) {
  .faculty-grid .item.faculty { padding: 7px 7px 12px; gap: 8px; }
  .faculty-grid .faculty .portrait { height: 200px; }
  .faculty-grid .faculty .portrait::before { inset: 7px; }
  .faculty-grid .faculty .who { min-height: 76px; }
  .faculty-grid .faculty .who b { font-size: 22px; }
  .faculty-grid .faculty .who small { font-size: 14px; }
  .faculty-grid .faculty .biz-line { font-size: 12px; }
  .rail-player { border-width: 1px; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .faculty-grid .faculty .portrait .tycoon-character { transition: none; }
  .faculty-grid .faculty:hover .tycoon-character { transform: none; }
}
body.reduced-motion .faculty-grid .faculty .portrait .tycoon-character { transition: none; }
body.reduced-motion .faculty-grid .faculty:hover .tycoon-character { transform: none; }

.empire-topline h1 { font: inherit; letter-spacing: inherit; }
