/* OinkOS: the farm computer (oinkos.js). The look of an early-2000s desktop: a blue taskbar, a green
   Start button, blue title bars and beige window bodies, in the fonts those PCs shipped with, over our
   own wallpaper. */

.oinkos {
  position: fixed; inset: 0; z-index: 60;
  font: 400 12px/1.35 Tahoma, Verdana, 'Segoe UI', sans-serif; color: #000;
  -webkit-user-select: none; user-select: none;
}
.oinkos[hidden] { display: none; }
.oinkos button { font: inherit; color: inherit; }
.oi { display: inline-block; flex: none; }
.oi svg { display: block; width: 100%; height: 100%; }

/* the desktop, with its wallpaper (sunset over the hog pasture) */
.os-desk { position: absolute; inset: 0 0 34px; background: #3b5aa8; overflow: hidden; }
.os-wall { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.os-icons { position: absolute; top: 10px; left: 8px; display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 86px); gap: 4px; height: calc(100% - 20px); }
.os-icon {
  width: 84px; padding: 4px 2px; border: 1px solid transparent; background: none; cursor: default;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.os-icon .lbl { color: #fff; text-align: center; text-shadow: 1px 1px 1px #000, 0 0 3px #000; padding: 0 2px; }
.os-icon.sel .lbl, .os-icon:focus-visible .lbl { background: #316ac5; text-shadow: none; }
.os-icon.sel .oi { filter: brightness(0.8) sepia(1) hue-rotate(180deg) saturate(3); }
.os-icon:focus-visible { outline: 1px dotted #fff; }

/* the taskbar */
.os-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34px; display: flex; align-items: stretch;
  background: linear-gradient(#3168d5 0, #4993e6 8%, #2157d7 40%, #2157d7 88%, #1941a5 100%);
  border-top: 1px solid #0c2e8c;
}
.os-start {
  display: flex; align-items: center; gap: 6px; padding: 0 18px 0 10px; border: 0; cursor: pointer;
  border-radius: 0 12px 12px 0; box-shadow: inset -2px 0 3px rgba(0, 0, 0, 0.25);
  background: linear-gradient(#3c9a3c 0, #5ec35e 12%, #36a236 45%, #2b8a2b 90%, #1f6d1f 100%);
}
.os-start i { font: italic 700 18px/1 'Trebuchet MS', Tahoma, sans-serif; color: #fff; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6); padding-right: 2px; }
.os-start:hover, .os-start.on { filter: brightness(1.08); }
.os-start.on { box-shadow: inset 1px 2px 4px rgba(0, 0, 0, 0.5); }
.os-tasks { flex: 1; display: flex; gap: 3px; padding: 3px 6px; min-width: 0; overflow: hidden; }
.os-task {
  display: flex; align-items: center; gap: 5px; min-width: 0; max-width: 170px; flex: 1; padding: 0 8px; cursor: pointer;
  border: 1px solid #1c46b6; border-radius: 3px; color: #fff;
  background: linear-gradient(#5b9af0, #3c7ce5 40%, #3673df); box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.35);
}
.os-task .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-task.on { background: linear-gradient(#1c4fbf, #2159c9); box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.5); }
.os-tray {
  display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #fff;
  background: linear-gradient(#1290e8, #1d9ef1 20%, #0f86e0 60%, #0b6fc4); border-left: 1px solid #0b4a9e;
  box-shadow: inset 1px 0 1px rgba(255, 255, 255, 0.3);
}
.os-tray-icon { width: 16px; height: 16px; }
.os-tray-icon svg { display: block; width: 100%; height: 100%; }

/* the Start menu */
.os-menu {
  position: absolute; left: 0; bottom: 34px; width: 380px; max-width: 100vw; z-index: 1000;
  border: 1px solid #0b3e9e; border-radius: 8px 8px 0 0; overflow: hidden; background: #fff;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.45);
}
.os-menu-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: #fff;
  background: linear-gradient(#1868ce, #0e60cb 60%, #1257b4); border-bottom: 2px solid #e8a13a;
}
.os-menu-head .oi { border: 2px solid #fff; border-radius: 4px; background: #fff; }
.os-menu-head b { font: 700 16px/1 'Trebuchet MS', Tahoma, sans-serif; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); }
.os-menu-cols { display: grid; grid-template-columns: 1fr 1fr; }
.os-menu-left { padding: 6px 0; display: flex; flex-direction: column; }
.os-menu-right { padding: 6px 0; display: flex; flex-direction: column; background: #d3e5fa; border-left: 1px solid #95bdee; }
.os-mi { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border: 0; background: none; text-align: left; cursor: pointer; font-weight: 700; }
.os-menu-right .os-mi { font-weight: 400; color: #0a246a; }
.os-mi:hover, .os-mi:focus-visible { background: #316ac5; color: #fff; outline: none; }
.os-menu-foot { display: flex; justify-content: flex-end; padding: 6px 10px; background: linear-gradient(#4282d6, #3b77cf); }
.os-off { display: flex; align-items: center; gap: 6px; border: 0; background: none; color: #fff; cursor: pointer; padding: 3px 6px; }
.os-off:hover, .os-off:focus-visible { background: rgba(255, 255, 255, 0.2); outline: none; border-radius: 3px; }

/* windows */
.os-windows { position: absolute; inset: 0; pointer-events: none; }
.os-win {
  position: absolute; width: 480px; max-width: calc(100vw - 16px); pointer-events: auto;
  display: flex; flex-direction: column; max-height: calc(100% - 16px);
  border: 3px solid #0b4fd5; border-top: 0; border-radius: 8px 8px 0 0; background: #ece9d8;
  box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.4);
}
.os-win:not(.active) { border-color: #7a96df; }
.os-win[hidden] { display: none; }
.os-title {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 28px; padding: 0 4px 0 6px;
  margin: 0 -3px; border-radius: 7px 7px 0 0; color: #fff; cursor: default; touch-action: none;
  background: linear-gradient(#0997ff, #0053ee 8%, #0050ee 40%, #06f 88%, #06f 93%, #005bff 95%, #003dd7);
}
.os-win:not(.active) .os-title { background: linear-gradient(#7697e7, #7e9ee3 20%, #94afe8 60%, #97b4e9); }
.os-title-text { display: flex; align-items: center; gap: 5px; min-width: 0; }
.os-title-text b { font: 700 13px/1 'Trebuchet MS', Tahoma, sans-serif; text-shadow: 1px 1px 1px #0a1c52; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-tbs { display: flex; gap: 2px; flex: none; }
.os-tb {
  position: relative; width: 22px; height: 22px; padding: 0; cursor: pointer;
  border: 1px solid #fff; border-radius: 3px; background: linear-gradient(135deg, #3c8cf9, #1d5fe0);
}
.os-tb:hover { filter: brightness(1.15); }
.os-tb.close { background: linear-gradient(135deg, #e87a5a, #c8431f); }
.os-tb::before, .os-tb::after { content: ''; position: absolute; background: #fff; }
.os-tb.min::before { left: 5px; right: 8px; bottom: 5px; height: 3px; }
.os-tb.max::before { left: 5px; top: 5px; right: 5px; bottom: 5px; background: none; border: 2px solid #fff; border-top-width: 3px; }
.os-tb.close::before, .os-tb.close::after { left: 50%; top: 4px; bottom: 4px; width: 2px; margin-left: -1px; transform: rotate(45deg); }
.os-tb.close::after { transform: rotate(-45deg); }
.os-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
/* snapped and maximized windows (oinkos.js: dragged to an edge or a corner, or a snap layout) */
.os-win.snapped { max-width: none; max-height: none; border-radius: 0; box-shadow: none; }
.os-win.snapped .os-title { border-radius: 0; }
.os-win.max { border-width: 0; }
.os-win.max .os-title { margin: 0; }
.os-win.opening { animation: os-open 0.14s ease-out; }
@keyframes os-open { from { opacity: 0; transform: scale(0.96); } }
.os-win.dragging, .os-win.resizing { user-select: none; -webkit-user-select: none; }
.os-win.dragging { opacity: 0.94; }
.os-title { position: relative; }
/* the restore button, once it's maximized: two little windows */
.os-win.max .os-tb.max::before { left: 7px; top: 4px; right: 4px; bottom: 7px; border-width: 2px; border-top-width: 3px; }
.os-win.max .os-tb.max::after { left: 4px; top: 8px; right: 8px; bottom: 4px; background: #2a6ef0; border: 2px solid #fff; border-top-width: 3px; }
/* resizing: a thin grip along each edge, a bigger one at each corner */
.os-rz { position: absolute; z-index: 3; touch-action: none; }
.os-rz.n, .os-rz.s { left: 10px; right: 10px; height: 8px; cursor: ns-resize; }
.os-rz.n { top: -4px; } .os-rz.s { bottom: -5px; }
.os-rz.e, .os-rz.w { top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
.os-rz.e { right: -6px; } .os-rz.w { left: -6px; }
.os-rz.ne, .os-rz.nw, .os-rz.se, .os-rz.sw { width: 16px; height: 16px; }
.os-rz.ne { top: -5px; right: -7px; cursor: nesw-resize; } .os-rz.sw { bottom: -6px; left: -7px; cursor: nesw-resize; }
.os-rz.nw { top: -5px; left: -7px; cursor: nwse-resize; } .os-rz.se { bottom: -6px; right: -7px; cursor: nwse-resize; }
.os-win.max .os-rz { display: none; }
/* where a dragged window will snap */
.os-snap-preview { position: absolute; z-index: 100000; pointer-events: none; box-sizing: border-box; border-radius: 8px; margin: 4px;
  border: 2px solid rgba(255, 255, 255, 0.85); background: rgba(140, 180, 255, 0.28); -webkit-backdrop-filter: blur(4px) saturate(1.2); backdrop-filter: blur(4px) saturate(1.2);
  box-shadow: 0 0 0 1px rgba(10, 40, 120, 0.35), 0 8px 30px rgba(0, 0, 0, 0.25); transition: left 0.15s ease, top 0.15s ease, width 0.15s ease, height 0.15s ease; }
.os-snap-preview[hidden] { display: none; }
/* snap layouts, from the maximize button */
.os-layouts { position: absolute; top: 29px; right: 2px; z-index: 50; display: grid; grid-template-columns: repeat(3, 66px); gap: 8px; padding: 10px;
  background: #f6f8fd; border: 1px solid #7a96df; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); cursor: default; }
.os-layout { position: relative; height: 44px; border-radius: 4px; background: #e2e7f2; }
.os-layout-cell { position: absolute; box-sizing: border-box; padding: 0; border: 2px solid #e2e7f2; border-radius: 4px; background: #b9c8e6; cursor: pointer; }
.os-layout-cell:hover, .os-layout-cell:focus-visible { background: #2f6fe8; outline: none; }

/* phones: windows fill the screen */
@media (max-width: 700px) {
  .os-win:not(.dialog) { left: 0 !important; top: 0 !important; width: 100% !important; max-width: none; height: 100% !important; max-height: none; border-radius: 0; }
  .os-win:not(.dialog) .os-title { border-radius: 0; }
  .os-win.dialog { left: 50% !important; top: 30% !important; transform: translateX(-50%); }
  .os-rz, .os-layouts { display: none !important; }
  .os-win:not(.dialog) { animation: none; }
  .os-menu { width: 100vw; }
  .os-task { max-width: 120px; }
}

/* inside windows */
.os-menubar { display: flex; gap: 2px; padding: 2px 4px; border-bottom: 1px solid #d4d0c8; background: #ece9d8; }
.os-menubar span { padding: 1px 6px; color: #333; }
.os-address { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-bottom: 1px solid #d4d0c8; color: #444; }
.os-address b { flex: 1; display: flex; align-items: center; gap: 4px; padding: 2px 4px; background: #fff; border: 1px solid #7f9db9; font-weight: 400; color: #000; }
.os-address i { font-style: normal; }
.os-explorer { display: flex; flex: 1; min-height: 240px; background: #fff; }
.os-side { width: 180px; flex: none; padding: 10px; background: linear-gradient(#7ba2e7, #6375d6); }
.os-side-box { margin-bottom: 10px; border-radius: 4px 4px 0 0; overflow: hidden; background: #d6dff7; }
.os-side-box h4 { margin: 0; padding: 5px 8px; color: #215dc6; font: 700 11px/1.2 Tahoma, sans-serif; background: linear-gradient(90deg, #fff, #c6d3f7); }
.os-side-box p { margin: 0; padding: 6px 8px 8px; color: #333; font-size: 11px; }
.os-files { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; padding: 10px; background: #fff; }
.os-files.big { flex-direction: column; flex-wrap: nowrap; }
.os-file { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid transparent; background: none; color: #000; text-decoration: none; text-align: left; cursor: pointer; border-radius: 2px; }
.os-file:hover, .os-file:focus-visible { background: #e3ebf9; border-color: #aec4ef; outline: none; }
.os-file b { display: block; font-weight: 700; }
.os-file small { display: block; color: #666; font-size: 11px; }
.os-file.row { width: 100%; padding: 3px 6px; }
.os-file.row b { font-weight: 400; }
.os-notepad {
  flex: 1; min-height: 300px; margin: 0; padding: 4px 6px; border: 0; border-top: 1px solid #d4d0c8; resize: none; outline: none;
  font: 13px/1.35 'Lucida Console', 'Courier New', monospace; color: #000; background: #fff; -webkit-user-select: text; user-select: text;
}
@media (max-width: 700px) { .os-side { display: none; } .os-notepad { font-size: 12px; } }

/* message boxes */
.os-msg { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 8px; }
.os-msg p { margin: 6px 0 0; font-size: 12px; }
.os-msg-btns { display: flex; justify-content: center; gap: 8px; padding: 8px 16px 14px; }
.os-btn {
  min-width: 76px; padding: 4px 12px; cursor: pointer; border: 1px solid #003c74; border-radius: 3px;
  background: linear-gradient(#fff, #ecebe6 80%, #d6d0c5);
}
.os-btn:hover { box-shadow: inset 0 0 0 2px #f9b33d; }
.os-btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }

/* turning it off */
.os-shut { background: linear-gradient(#5a7edc, #4b6fd0); }
.os-shut-row { display: flex; justify-content: space-around; padding: 20px 12px 12px; }
.os-off-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; color: #fff; cursor: pointer; }
.os-off-opt i { display: block; width: 36px; height: 36px; border-radius: 6px; border: 2px solid #fff; box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4); }
.os-off-opt:hover i, .os-off-opt:focus-visible i { filter: brightness(1.2); }
.os-shut .os-msg-btns { background: none; }

/* booting up */
.os-boot { position: absolute; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; background: #000; color: #fff; transition: opacity 0.4s ease; }
.os-boot.gone { opacity: 0; }
.os-boot-logo { display: flex; align-items: center; gap: 14px; }
.os-boot-logo b { display: block; font: italic 700 44px/1 'Trebuchet MS', Tahoma, sans-serif; }
.os-boot-logo b span { color: #e8a13a; font-size: 30px; vertical-align: super; margin-left: 2px; }
.os-boot-logo small { display: block; margin-top: 4px; font: italic 400 14px/1 'Trebuchet MS', Tahoma, sans-serif; color: #b8c8e8; }
.os-boot-bar { position: relative; width: 150px; height: 16px; border: 2px solid #b2b2b2; border-radius: 4px; overflow: hidden; }
.os-boot-bar i { position: absolute; top: 2px; width: 8px; height: 8px; border-radius: 2px; background: linear-gradient(#5b8df2, #1d4fd6); animation: os-boot 1.4s linear infinite; }
.os-boot-bar i:nth-child(2) { animation-delay: 0.1s; }
.os-boot-bar i:nth-child(3) { animation-delay: 0.2s; }
@keyframes os-boot { from { left: -30px; } to { left: 160px; } }
.os-boot p { position: absolute; left: 20px; bottom: 16px; margin: 0; color: #888; font-size: 11px; }

/* the way in, on the farm */
.pc-btn {
  position: fixed; left: 116px; bottom: 16px; width: 40px; height: 40px; padding: 9px; border-radius: 999px;
  border: 1px solid rgba(255, 248, 231, 0.35); background: var(--panel); color: var(--paper); cursor: pointer;
}
.pc-btn svg { display: block; width: 100%; height: 100%; }
.pc-btn:hover { background: rgba(43, 29, 18, 0.9); }
body.ui-hidden .pc-btn:not(:hover):not(:focus-visible) { opacity: 0; }
@media (max-width: 600px) { .pc-btn { left: 108px; bottom: 12px; } }
/* while the computer's on, the farm's own controls step aside */
body.oink-open .brand, body.oink-open .projects, body.oink-open .viewpad, body.oink-open .floorpad, body.oink-open #minimap,
body.oink-open .hint, body.oink-open .settings, body.oink-open .board-wrap, body.oink-open .chore-layer, body.oink-open .pc-btn,
body.oink-open .toasts, body.oink-open #dev-panel, body.oink-open #dev-overlay, body.oink-open #dev-tip { visibility: hidden; }

/* signing in (the Sign In / My Account window) */
.os-account { padding: 14px 16px 6px; -webkit-user-select: text; user-select: text; }
.os-acc-head { display: flex; gap: 12px; align-items: flex-start; }
.os-acc-head b { display: block; font: 700 15px/1.2 'Trebuchet MS', Tahoma, sans-serif; color: #0a246a; margin-top: 2px; }
.os-acc-head p { margin: 4px 0 0; color: #333; }
.os-avatar { width: 48px; height: 48px; flex: none; border-radius: 4px; border: 2px solid #fff; box-shadow: 0 0 0 1px #7f9db9; object-fit: cover; }
.os-avatar.small { width: 40px; height: 40px; }
.os-acc-text { margin: 12px 0 4px; color: #222; }
.os-google-row { display: flex; justify-content: center; margin: 16px 0 4px; }
.os-google {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; cursor: pointer; border-radius: 4px;
  background: #fff; border: 1px solid #747775; color: #1f1f1f !important; font: 500 13px/1 Roboto, 'Segoe UI', Arial, sans-serif !important;
}
.os-google:hover { background: #f5f7fb; }
.os-or { display: flex; align-items: center; gap: 8px; margin: 10px 0; color: #666; }
.os-or::before, .os-or::after { content: ''; flex: 1; border-top: 1px solid #c9c5b6; }
.os-email { display: grid; gap: 6px; }
.os-email label { color: #333; }
.os-input { padding: 4px 6px; border: 1px solid #7f9db9; background: #fff; font: 13px Tahoma, Verdana, sans-serif; color: #000; }
.os-input:focus { outline: 1px solid #316ac5; }
.os-email .os-btn { justify-self: end; }
.os-status { min-height: 1.4em; margin: 8px 0 4px; color: #b3261e; }
.os-status:empty { visibility: hidden; }
.os-link { border: 0; background: none; color: #0645ad; text-decoration: underline; cursor: pointer; padding: 0; }
.os-name-row { display: flex; gap: 6px; }
.os-name-row .os-input { flex: 1; min-width: 0; }
.os-hint { color: #666; font-size: 11px; }

/* the Stud Book */
.os-studbook { padding: 10px 12px; background: #fff; -webkit-user-select: text; user-select: text; }
.os-studbook h4 { margin: 12px 0 4px; padding-bottom: 2px; color: #0a246a; font: 700 12px/1.2 Tahoma, sans-serif; border-bottom: 1px solid #c9d3e6; }
.os-sb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.os-sb-head b { font: 700 15px/1.2 'Trebuchet MS', Tahoma, sans-serif; color: #0a246a; }
.os-muted { color: #666; }
.os-pair { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.os-pair select { max-width: 200px; }
.os-status.ok { color: #1f6d1f; }
.os-table-wrap { overflow: auto; max-height: 320px; border: 1px solid #c9d3e6; }
.os-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.os-table th { position: sticky; top: 0; background: #ece9d8; text-align: left; padding: 3px 6px; border-bottom: 1px solid #aca899; font-weight: 400; }
.os-table td { padding: 3px 6px; border-bottom: 1px solid #eef0f5; white-space: nowrap; }
.os-table td.hi { color: #1f6d1f; font-weight: 700; }
.os-table td.lo { color: #a33; }
.os-table tr[tabindex] { cursor: pointer; }
.os-table tr[tabindex]:hover, .os-table tr[tabindex]:focus-visible { background: #316ac5; color: #fff; outline: none; }
.os-table tr[tabindex]:hover td, .os-table tr[tabindex]:focus-visible td { color: #fff; }
.os-alumni { margin: 4px 0 0; padding-left: 18px; color: #333; }
.os-hogcard { padding: 12px; background: #fff; -webkit-user-select: text; user-select: text; }

/* ---------- the Farm Supply store (game/store.js) ---------- */
.os-store { padding: 0 0 10px; background: #fffaf0; -webkit-user-select: text; user-select: text; }
.st-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 12px 8px; background: linear-gradient(#b8453a, #9a3a30); color: #fff8e7; border-bottom: 3px solid #e8b33c; }
.st-logo { font: 700 20px/1 'Trebuchet MS', Tahoma, sans-serif; letter-spacing: 0.02em; text-shadow: 0 1px 0 #6e241c; }
.st-tag { font-size: 11px; opacity: 0.85; }
.st-cash { margin-left: auto; font: 700 13px/1 Tahoma, sans-serif; color: #fff2b0; }
.st-aisle { padding: 0 12px; }
.st-aisle h4 { margin: 12px 0 4px; padding-bottom: 2px; color: #6e241c; font: 700 12px/1.2 Tahoma, sans-serif; border-bottom: 1px solid #e4cfb0; }
.st-item { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 1px dotted #ead9bd; }
.st-icon { font-size: 22px; text-align: center; }
.st-info b { font: 700 12px/1.3 Tahoma, sans-serif; }
.st-pips { color: #b8453a; font-size: 10px; letter-spacing: 1px; }
.st-now { color: #555; font-size: 11px; line-height: 1.35; }
.st-buy { min-width: 96px; white-space: nowrap; }
.st-buy:disabled { opacity: 0.55; cursor: default; box-shadow: none; }

.st-moved { margin: 4px 0 6px; padding: 6px 8px; border-radius: 4px; background: #eef4fb; color: #2f5a80; font-size: 11px; }
.st-moved[hidden], .st-item[hidden] { display: none; }

/* ---------- Farm Plans: the growth tree (game/growth.js) ---------- */
.os-plans .st-head { background: linear-gradient(#2f6fb0, #245a90); border-bottom-color: #e8b33c; }
.os-plans .st-logo { text-shadow: 0 1px 0 #1d4a78; }
.gp-mats { margin-left: auto; font: 700 13px/1 Tahoma, sans-serif; color: #eaf2fa; }
.os-plans .gp-mats + .st-cash { margin-left: 12px; }
.gp-intro { margin: 10px 12px 2px; font-size: 11px; color: #555; }
.gp-branch { padding: 0 12px; }
.gp-branch h4 { margin: 12px 0 6px; padding-bottom: 2px; color: #1d4a78; font: 700 12px/1.2 Tahoma, sans-serif; border-bottom: 1px solid #c8d8ea; }
.gp-track { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.gp-arrow { align-self: center; color: #8aa8c8; font-size: 16px; }
.gp-tier { position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 150px; max-width: 190px; padding: 7px 9px; border-radius: 6px; border: 2px solid #c8d8ea; background: #f6f9fd; font-size: 11px; color: #333; }
.gp-tier b { font: 700 12px/1.25 Tahoma, sans-serif; color: #1d3a5a; }
.gp-tier small { color: #555; line-height: 1.35; }
.gp-step { font: 700 9px/1 Tahoma, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: #6a8aaa; }
.gp-tier.done { border-color: #8fc96a; background: #f2f9ec; }
.gp-tier.done .gp-step { color: #4f8a3a; }
.gp-tier.next { border-color: #e8b33c; background: #fffaf0; }
.gp-tier.going { border-color: #2f6fb0; }
.gp-tier.soon { opacity: 0.6; border-style: dashed; }
.gp-build { margin-top: 3px; align-self: flex-start; }
.gp-build[hidden], .gp-bar[hidden] { display: none; }
.gp-bar { display: block; height: 6px; border-radius: 3px; background: #dde8f4; overflow: hidden; }
.gp-bar i { display: block; height: 100%; width: 0; background: #2f6fb0; transition: width 0.9s linear; }
.gp-boosts { margin: 4px 0 2px; }
.gp-boost { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; padding: 5px 2px; border-bottom: 1px dotted #d8e4f0; }

/* ---------- Research Notes ---------- */
.rn-head { background: linear-gradient(#2f5a4a, #24473a); border-bottom-color: #6fcf8a; }
.rn-who { margin: 10px 0 0; font-size: 12px; color: #333; }
.os-notes .st-item.done { opacity: 0.6; }
.rn-odds { flex-basis: 100%; margin: 6px 0 0; font-size: 11px; }

/* ---------- Land (game/landapp.js) ---------- */
.la-head { background: linear-gradient(#7a5a34, #5e4426); border-bottom-color: #9fc06a; }
.la-title b { display: block; font: 700 20px/1 'Trebuchet MS', Tahoma, sans-serif; text-shadow: 0 1px 0 #3a2814; }
.la-title span { font-size: 11px; opacity: 0.85; }
.la-main { padding: 10px 12px; }
.la-msg { margin: 4px 0 10px; font-size: 12px; line-height: 1.45; color: #444; }
.la-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px; border-radius: 6px; background: #cfe3ef; border: 1px solid #9ab7c9; }
.la-cell { min-height: 74px; padding: 6px; border: 2px solid rgba(0, 0, 0, 0.15); border-radius: 4px; cursor: pointer; text-align: left; display: flex; flex-direction: column; justify-content: space-between; color: #1d2a14; font: 12px Tahoma, sans-serif; }
.la-cell b { font-size: 12px; }
.la-cell small { font-size: 11px; opacity: 0.85; }
.la-cell.woods { background: #8fb878; } .la-cell.hill { background: #b7c48e; } .la-cell.field { background: #b9d88a; } .la-cell.meadow { background: #cfe39a; } .la-cell.creek { background: #9fd0c8; }
.la-cell.home { background: #e8c27a; cursor: default; color: #3a2814; }
.la-cell.shut { filter: grayscale(0.7); opacity: 0.6; }
.la-cell.open { border-color: #e8b33c; box-shadow: inset 0 0 0 1px #fff3cf; }
.la-cell.mine { border-color: #3d7a2a; }
.la-cell.sel { outline: 2px solid #2f6aa8; outline-offset: 1px; }
.la-info { margin-top: 10px; padding: 8px 10px; border: 1px solid #e4cfb0; border-radius: 4px; background: #fff; font-size: 12px; }
.la-info h3 { margin: 0 0 4px; font: 700 14px Tahoma, sans-serif; color: #3a2814; }
.la-info p { margin: 0 0 6px; line-height: 1.4; }
.la-facts { color: #666; font-size: 11px; }
.la-yours { color: #2f7a2a; font-weight: 700; }
.la-why { margin-left: 8px; font-size: 11px; color: #666; }
.la-info .os-btn:disabled { opacity: 0.55; cursor: default; }
.la-lots { display: grid; gap: 4px; margin-top: 4px; }
.la-lot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 8px; border: 1px dashed #d6c4a4; border-radius: 4px; background: #fffaf0; }
.la-lot b { font: 700 11px Tahoma, sans-serif; color: #5e4426; min-width: 120px; }
.la-built { color: #2f7a2a; font-size: 11px; font-weight: 700; }
.la-soon { color: #8a6a3c; font-size: 11px; font-style: italic; }
.la-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.la-acts .os-btn { font-size: 11px; padding: 3px 8px; min-width: 0; }
.oinkos .hog-card .hc-pasture, .hog-card .hc-pasture { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0 8px; font-size: 12px; }
.hc-move { padding: 2px 8px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, 0.25); background: rgba(255, 255, 255, 0.85); color: #3a2814; font: 600 11px/1.3 system-ui, sans-serif; cursor: pointer; }
.hc-move:hover { background: #fff3cf; }

/* ---------- Genetics Lab (game/genelabapp.js) ---------- */
.gl-head { background: linear-gradient(#2f6aa8, #24537f); border-bottom-color: #58c08a; }
.gl-title b { display: block; font: 700 20px/1 'Trebuchet MS', Tahoma, sans-serif; text-shadow: 0 1px 0 #163a5c; }
.gl-title span { font-size: 11px; opacity: 0.85; }
.gl-who { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 11px; }
.gl-who b { font: 700 12px Tahoma, sans-serif; color: #fff2b0; }
.gl-main { padding: 8px 12px 0; }
.gl-msg { margin: 6px 0; font-size: 12px; line-height: 1.45; color: #333; }
.gl-levels { margin: 4px 0 10px; padding-left: 18px; font-size: 12px; color: #444; line-height: 1.5; }
.gl-assign, .gl-pick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; font-size: 12px; }
.gl-pick select { max-width: 240px; font-size: 12px; }
.gl-tabs { display: flex; gap: 2px; margin: 2px 0 8px; border-bottom: 1px solid #c8d6e2; }
.gl-tab { padding: 5px 12px; border: 1px solid #c8d6e2; border-bottom: 0; border-radius: 4px 4px 0 0; background: #eef3f8; font: 12px Tahoma, sans-serif; cursor: pointer; color: #24537f; }
.gl-tab.on { background: #fff; font-weight: 700; margin-bottom: -1px; padding-bottom: 6px; }
.gl-facts { margin: 6px 0 8px; font-size: 11px; color: #444; line-height: 1.45; }
.gl-facts.warn, .gl-sub.warn { color: #a0361e; }
.gl-stats { display: grid; grid-template-columns: auto auto minmax(150px, 1fr) auto; gap: 3px 10px; align-items: center; font-size: 12px; }
.gl-th { font: 700 10px Tahoma, sans-serif; color: #6a7a88; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid #dde6ee; padding-bottom: 2px; }
.gl-k { font-weight: 700; color: #24537f; }
.gl-par { color: #666; white-space: nowrap; }
.gl-bar { display: flex; align-items: flex-end; gap: 1px; height: 26px; }
.gl-hist { display: flex; align-items: flex-end; gap: 1px; width: 110px; height: 100%; border-bottom: 1px solid #c8d6e2; }
.gl-hist i { display: block; flex: 1 1 0; max-width: 12px; background: #9fc0de; border-radius: 1px 1px 0 0; }
.gl-hist i.up { background: #58c08a; }
.gl-track { position: relative; display: block; align-self: center; width: 110px; height: 8px; border-radius: 4px; background: #e2eaf1; }
.gl-track b { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: #9fc0de; }
.gl-track em { position: absolute; top: -2px; width: 3px; height: 12px; margin-left: -1px; border-radius: 1px; background: #24537f; }
.gl-bar small { align-self: center; margin-left: 8px; color: #444; white-space: nowrap; }
.gl-beat { font-size: 11px; color: #2f7a4a; white-space: nowrap; }
.gl-quality { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 10px 0 4px; font-size: 12px; }
.gl-chip { padding: 1px 6px; border: 1px solid; border-radius: 10px; font: 700 11px Tahoma, sans-serif; background: #fff; }
.gl-note { color: #666; font-size: 11px; }
.gl-locked { margin: 8px 0; padding: 5px 8px; border: 1px dashed #c8d6e2; border-radius: 4px; background: #f6f9fc; font-size: 11px; color: #5a6a78; }
.gl-looks p { margin: 10px 0 4px; font-size: 12px; }
.gl-pics { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0; }
.gl-pic { margin: 0; text-align: center; font-size: 10px; color: #555; }
.gl-pic canvas { display: block; border: 2px solid #ccc; border-radius: 4px; image-rendering: pixelated; }
.gl-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.gl-act .os-btn:disabled { opacity: 0.55; cursor: default; }
.gl-check { font-size: 12px; display: flex; align-items: center; gap: 2px; }
.gl-ranks { margin: 4px 0; padding-left: 22px; }
.gl-rank { padding: 6px 0; border-bottom: 1px dotted #d6e0ea; font-size: 12px; }
.gl-rank > * { vertical-align: middle; }
.gl-rank { display: list-item; }
.gl-rank .gl-info { display: inline-flex; flex-direction: column; gap: 1px; width: calc(100% - 100px); }
.gl-rank .gl-act { display: inline-flex; margin: 0; width: 90px; justify-content: flex-end; }
.gl-info b { font: 700 12px/1.3 Tahoma, sans-serif; }
.gl-info span { color: #555; font-size: 11px; line-height: 1.35; }
@media (max-width: 560px) { .gl-stats { grid-template-columns: auto 1fr; } .gl-par, .gl-th:nth-child(2), .gl-th:nth-child(4) { display: none; } .gl-beat { grid-column: 2; } }

/* ---------- Race Track (game/racetrack.js) ---------- */
.rt-head { background: linear-gradient(#2f6a3a, #24532d); border-bottom-color: #f4f0ea; }
.rt-title b { display: block; font: 700 20px/1 'Trebuchet MS', Tahoma, sans-serif; text-shadow: 0 1px 0 #163a1c; }
.rt-title span { font-size: 11px; opacity: 0.85; }
.rt-next { margin-left: auto; font: 700 12px/1.3 Tahoma, sans-serif; color: #fff2b0; text-align: right; }
.rt-h { margin: 12px 12px 4px; padding-bottom: 2px; color: #24532d; font: 700 12px/1.2 Tahoma, sans-serif; border-bottom: 1px solid #cfe0c8; }
.rt-list { padding: 0 12px; }
.rt-race { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 2px; border-bottom: 1px dotted #d6e4cf; }
.rt-race.derby { margin: 2px -6px; padding: 7px 8px; background: #fff3cf; border: 1px solid #e8b33c; border-radius: 4px; }
.rt-info { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rt-info b { font: 700 12px/1.3 Tahoma, sans-serif; }
.rt-info span { color: #555; font-size: 11px; line-height: 1.35; }
.rt-info .rt-purse { color: #2f6a3a; }
.rt-act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rt-act select { max-width: 230px; font-size: 12px; }
.rt-act .os-btn:disabled { opacity: 0.55; cursor: default; }
.rt-in { color: #2f6a3a; font: 700 11px Tahoma, sans-serif; }
.rt-closed { color: #888; font-size: 11px; font-style: italic; }
.rt-empty { margin: 6px 0; color: #666; font-size: 12px; }
.rt-stage { position: absolute; inset: 0; z-index: 2; overflow: auto; padding: 10px 12px; background: #1f2a1f; color: #f4f0ea; }
.os-races { position: relative; }
.rt-stage-h { margin: 0 0 6px; font: 700 14px Tahoma, sans-serif; }
.rt-canvas { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto; image-rendering: pixelated; border: 2px solid #0e140e; border-radius: 4px; }
.rt-say { min-height: 1.4em; margin: 8px 0; font: 700 13px/1.4 Tahoma, sans-serif; color: #ffe27a; }
.rt-table { display: grid; gap: 2px; margin: 4px 0 8px; font-size: 12px; }
.rt-row { padding: 2px 6px; border-radius: 3px; background: rgba(255,255,255,0.06); }
.rt-row.mine { background: rgba(255,226,122,0.22); color: #ffe27a; font-weight: 700; }
.rt-btns { display: flex; gap: 8px; justify-content: flex-end; }
.rt-btns .os-btn { color: #1a1a1a; }
.oinkos .hog-card .hc-ribbons { margin: 8px 0 0; font-size: 12px; color: #2f6a3a; }
.hog-card .hc-ribbons { margin: 8px 0 0; font-size: 12px; }
.oinkos .hog-card .hc-trait { color: #8a5a00; }
.oinkos .hog-card .hc-trained { color: #1f6d1f; }
.rn-odds.warn { color: #b3261e; }

/* ---------- Handsome Hogs (game/dating.js) ---------- */
.hh-head { background: linear-gradient(#e8527a, #c43a64); border-bottom-color: #ffd1de; }
.hh-note { margin: 10px 0 0; font-size: 12px; color: #6a3a4a; }
.hh-card { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; margin: 10px 0; padding: 8px; border: 1px solid #f2c4d2; border-radius: 6px; background: #fff; }
.hh-card.hh-uncommon { border-color: #8fd09a; } .hh-card.hh-rare { border-color: #8fb4f2; box-shadow: 0 0 0 1px #cfe0ff; } .hh-card.hh-legendary { border-color: #e8b33c; box-shadow: 0 0 0 2px #ffe7a0; } .hh-card.hh-epic { border-color: #9b59d0; box-shadow: 0 0 0 2px #e2ccff; }
.hh-photo { width: 96px; height: 72px; border-radius: 4px; image-rendering: pixelated; }
.hh-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hh-name { font: 700 14px/1.2 'Trebuchet MS', Tahoma, sans-serif; color: #9a2a4a; }
.hh-meta { font-size: 11px; color: #555; }
.hh-trait { font-size: 11px; color: #8a5a00; }
.hh-bio { margin: 4px 0; font-size: 12px; font-style: italic; color: #333; }
.hh-book { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hh-done { color: #1f6d1f; font-weight: 700; font-size: 12px; }

.oinkos .hog-card .hc-job { background: #f4f1ea; }
.oinkos .hog-card .hc-job-stars { color: #c08a00; }
.oinkos .hog-card .hc-job.on { border-color: #1f6d1f; }
.os-table td.sb-job { white-space: nowrap; color: #a07000; }

/* ---------- Hog Cards: the trading cards (game/tradingcard.js) and the app (game/cardsapp.js) ---------- */
.tc { --c: #9aa0a6; --c2: #5e6266; width: 250px; flex: none; border-radius: 12px; padding: 7px; background: linear-gradient(160deg, var(--c), var(--c2) 55%, var(--c)); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); text-align: left; box-sizing: border-box; }
.tc-uncommon { --c: #4caf50; --c2: #1f5a22; } .tc-rare { --c: #3d7fe0; --c2: #173a72; } .tc-epic { --c: #9b59d0; --c2: #3a1f52; } .tc-legendary { --c: #e8b020; --c2: #7a5208; }
.tc-in { background: #fbf6ea; color: #2a2420; border-radius: 7px; padding: 8px; display: flex; flex-direction: column; gap: 5px; font: 400 12px/1.38 'Inter', system-ui, sans-serif; }
.tc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.tc-name { font: 400 19px/1.05 'Anton', Impact, sans-serif; letter-spacing: 0.02em; }
.tc-tier { font-size: 10px; font-weight: 600; color: #fff; background: var(--c); border-radius: 999px; padding: 1px 7px; white-space: nowrap; text-transform: uppercase; }
.tc-title { font-size: 11px; font-style: italic; color: #5a4a3a; margin-top: -3px; }
.tc .tc-pic { display: block; width: 100%; image-rendering: pixelated; border-radius: 5px; border: 2px solid var(--c); box-sizing: border-box; }
.tc-origin { font-size: 10.5px; color: #6a5a48; }
.tc-stats { display: flex; gap: 4px; flex-wrap: wrap; }
.tc-stats span { font-size: 10.5px; background: #efe4cc; border-radius: 4px; padding: 1px 5px; }
.tc-stats span.top { background: var(--c); color: #fff; font-weight: 600; }
.tc-trait { font-size: 11px; font-weight: 600; color: #4a3a2a; }
.tc-bio { font-size: 11.5px; }
.tc-quote { font-size: 11px; font-style: italic; color: #6a5a48; border-top: 1px solid #e6d8b8; padding-top: 4px; }
.tc-foot { font-size: 9px; color: #a09080; text-align: right; margin-top: auto; }
.tc-legendary .tc-in { background: linear-gradient(#fffaf0, #fbf0d4); }
.tc-epic .tc-in { background: linear-gradient(#fdf8ff, #f4ecfb); }
/* the binder's small cards */
.tc-mini { --c: #9aa0a6; display: flex; flex-direction: column; gap: 2px; width: 124px; padding: 4px; border: 0; border-radius: 8px; background: var(--c); cursor: pointer; text-align: left; position: relative; font: inherit; }
.tc-mini.tc-uncommon { --c: #4caf50; } .tc-mini.tc-rare { --c: #3d7fe0; } .tc-mini.tc-epic { --c: #9b59d0; } .tc-mini.tc-legendary { --c: #e8b020; }
.tc-mini .tc-pic { width: 100%; image-rendering: pixelated; border-radius: 5px; }
.tc-mini-name { color: #fff; font: 400 14px/1.1 'Anton', Impact, sans-serif; letter-spacing: 0.02em; padding: 0 3px; }
.tc-mini-sub { color: rgba(255, 255, 255, 0.9); font-size: 10px; padding: 0 3px 2px; }
.tc-mini:hover { filter: brightness(1.08); transform: translateY(-1px); }
.tc-mini.new::after { content: 'NEW'; position: absolute; top: -5px; right: -5px; background: #e8527a; color: #fff; font: 700 9px/1 Tahoma, sans-serif; padding: 3px 5px; border-radius: 999px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.tc-epic.tc-mini, .tc-legendary.tc-mini { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5) inset, 0 0 10px var(--c); }
/* the app */
.os-cards { position: relative; min-height: 440px; }
.hc2-head { background: linear-gradient(#3a6fc4, #2a4f94); border-bottom-color: #f2c230; align-items: center; }
.hc2-title { display: flex; flex-direction: column; line-height: 1; }
.hc2-title b { font: 400 22px 'Anton', Impact, sans-serif; letter-spacing: 0.04em; }
.hc2-title span { font-size: 10px; opacity: 0.8; letter-spacing: 0.1em; text-transform: uppercase; }
.hc2-packs { font-weight: 700; font-size: 13px; }
.hc2-btns { display: flex; gap: 6px; margin-left: auto; }
.hc2-btns .os-btn { color: #1a1a1a; }
.hc2-open:not(:disabled) { animation: hc2-pulse 1.6s ease-in-out infinite; }
@keyframes hc2-pulse { 50% { box-shadow: 0 0 0 3px #f2c230; } }
.hc2-next { flex-basis: 100%; font-size: 11px; opacity: 0.85; }
.hc2-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid #e8dcc4; }
.hc2-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.hc2-chip { border: 1px solid #c8bca4; background: #fff; border-radius: 999px; padding: 2px 9px; font: inherit; font-size: 11px; cursor: pointer; }
.hc2-chip.on { background: #2a4f94; color: #fff; border-color: #2a4f94; }
.hc2-chip.tc-uncommon { border-color: #4caf50; } .hc2-chip.tc-rare { border-color: #3d7fe0; } .hc2-chip.tc-epic { border-color: #9b59d0; } .hc2-chip.tc-legendary { border-color: #e8b020; }
.hc2-count { margin-left: auto; font-size: 11px; color: #6a5a48; }
.hc2-grid { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; }
.hc2-empty { color: #6a5a48; padding: 20px 4px; }
.hc2-zoom { position: absolute; inset: 0; z-index: 3; background: rgba(20, 24, 32, 0.8); display: flex; gap: 14px; align-items: flex-start; justify-content: center; padding: 18px; overflow: auto; }
.hc2-zoom .tc { width: 290px; }
.hc2-zoom-side { display: flex; flex-direction: column; gap: 10px; max-width: 200px; }
.hc2-note { color: #f2ead8; font-size: 12px; margin: 0; }
/* opening a pack */
.hc2-stage { position: absolute; inset: 0; z-index: 2; background: radial-gradient(ellipse at 50% 40%, #3a4a6a, #141824 75%); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px; overflow: auto; }
.hc2-stage[hidden] { display: none; }
.hc2-stage-h { color: #fff8e7; font: 400 20px 'Anton', Impact, sans-serif; letter-spacing: 0.04em; margin: 4px 0 0; text-align: center; }
.hc2-wrapper { width: 200px; height: 290px; flex: none; border: 0; border-radius: 10px; cursor: pointer; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; overflow: hidden;
  background: linear-gradient(115deg, #c43a64 0%, #e8527a 30%, #ffd1de 45%, #e8527a 60%, #8a2a4a 100%); background-size: 220% 100%; animation: hc2-foil 3s linear infinite; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); transition: transform 0.45s, opacity 0.45s; }
@keyframes hc2-foil { to { background-position: -220% 0; } }
.hc2-wrapper b { font: 400 34px/1 'Anton', Impact, sans-serif; letter-spacing: 0.06em; text-shadow: 0 2px 0 #6a1a34; }
.hc2-wr-top, .hc2-wr-sub { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.hc2-wr-snout { width: 64px; height: 64px; border-radius: 50%; background: #f0a8a0; border: 4px solid #fff; box-shadow: inset 0 -6px 0 #e07d74; position: relative; }
.hc2-wr-snout::before, .hc2-wr-snout::after { content: ''; position: absolute; top: 28px; width: 10px; height: 13px; border-radius: 50%; background: #6b2a24; }
.hc2-wr-snout::before { left: 17px; } .hc2-wr-snout::after { right: 17px; }
.hc2-wr-tear { position: absolute; bottom: 12px; font-size: 11px; background: rgba(0, 0, 0, 0.3); padding: 3px 8px; border-radius: 999px; }
.hc2-wrapper.torn { transform: translateY(-60px) rotate(-6deg) scale(0.9); opacity: 0; }
.hc2-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hc2-flip { width: 150px; height: 290px; flex: none; border: 0; padding: 0; background: none; cursor: pointer; }
.hc2-flip-in { position: relative; width: 100%; height: 100%; transition: transform 0.18s ease-in; }
.hc2-flip.turning .hc2-flip-in { transform: scaleX(0); } /* (turned over: squashed flat, face swapped, and back) */
.hc2-flip .tc-back { position: absolute; inset: 0; }
.hc2-flip .tc { display: none; position: absolute; top: 0; left: -50px; width: 250px; transform: scale(0.6); transform-origin: 50% 0; }
.hc2-flip.up .tc-back { display: none; } .hc2-flip.up .tc { display: block; }
.hc2-flip.big-pull .tc { box-shadow: 0 0 18px var(--c), 0 0 40px var(--c); }
.tc-back { border-radius: 10px; padding: 6px; background: linear-gradient(135deg, #e8527a, #8a2a4a); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); box-sizing: border-box; }
.tc-back-in { height: 100%; box-sizing: border-box; border: 2px solid rgba(255, 255, 255, 0.7); border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 8px, transparent 8px 16px); }
.tc-back-in svg { width: 58px; height: 58px; }
.tc-back-in b { font: 400 18px 'Anton', Impact, sans-serif; letter-spacing: 0.08em; }
.tc-back-in small { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
.tc-back.glow-rare { box-shadow: 0 0 14px #3d7fe0; }
.tc-back.glow-epic { box-shadow: 0 0 18px #9b59d0, 0 0 34px #9b59d0; animation: hc2-shiver 0.9s ease-in-out infinite; }
.tc-back.glow-legendary { box-shadow: 0 0 20px #e8b020, 0 0 44px #e8b020; animation: hc2-shiver 0.6s ease-in-out infinite; }
@keyframes hc2-shiver { 25% { transform: rotate(-1.2deg); } 75% { transform: rotate(1.2deg); } }
.hc2-stage-btns { display: flex; gap: 8px; }
@media (max-width: 700px) { .hc2-flip { width: 120px; height: 232px; } .hc2-flip .tc { left: -65px; transform: scale(0.48); } .hc2-zoom { flex-direction: column; align-items: center; } }

/* ---------- a card's print: condition (wear), number, holo, First Edition, misprint, One of a Kind ---------- */
.tc { position: relative; --wear: 0; }
.tc-picwrap { position: relative; border-radius: 5px; overflow: hidden; }
.tc-print { font-size: 10px; color: #6a5a48; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.tc-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.tc-badge { font-size: 9.5px; font-weight: 700; border-radius: 4px; padding: 1px 6px; text-transform: uppercase; letter-spacing: 0.04em; background: #efe4cc; color: #4a3a2a; }
.tc-badge.b-one { background: linear-gradient(90deg, #e8b020, #fff2b0, #e8b020); color: #4a3000; }
.tc-badge.b-holo { background: linear-gradient(90deg, #ff9ad8, #9ad8ff, #b8ff9a, #ffe29a); color: #2a2440; }
.tc-badge.b-fe { background: #2a2420; color: #f2c230; }
.tc-badge.b-mis { background: #c8453a; color: #fff; }
.tc-badge.b-set { background: #3a6fc4; color: #fff; text-transform: none; letter-spacing: 0; }
/* wear: the colors fade, scuffs and creases show, and a well-loved card's corners are dinged */
.tc .tc-in { filter: saturate(calc(1 - var(--wear) * 0.35)) sepia(calc(var(--wear) * 0.22)); }
.tc::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: calc(var(--wear) * 0.9);
  background:
    linear-gradient(115deg, transparent 47%, rgba(255, 255, 255, 0.35) 48%, transparent 49.5%),
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.5) 0 1.5px, transparent 2px),
    radial-gradient(circle at 78% 9%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 64%, rgba(255, 255, 255, 0.5) 0 1.5px, transparent 2px),
    radial-gradient(circle at 23% 82%, rgba(255, 255, 255, 0.4) 0 1px, transparent 1.5px),
    radial-gradient(circle at 55% 47%, rgba(120, 90, 60, 0.18) 0 18px, transparent 26px),
    radial-gradient(circle at 6% 50%, rgba(255, 255, 255, 0.35) 0 1px, transparent 1.5px); }
.tc.tc-worn { clip-path: polygon(0 5px, 5px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 4px 100%, 0 calc(100% - 4px)); }
.tc-mini.tc-worn { clip-path: polygon(0 4px, 4px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 3px 100%, 0 calc(100% - 3px)); }
/* mint: a fresh-from-the-pack gloss */
.tc.tc-mint .tc-picwrap::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 40%); }
/* holo: a rainbow shimmer that moves over the picture and the frame */
.tc.tc-holo { background: linear-gradient(160deg, var(--c), #ff9ad8 30%, #9ad8ff 50%, #b8ff9a 70%, var(--c)); background-size: 300% 300%; animation: tc-holo 4s linear infinite; }
.tc.tc-holo .tc-picwrap::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; mix-blend-mode: color-dodge; opacity: 0.5;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 120, 200, 0.6) 35%, rgba(120, 200, 255, 0.6) 50%, rgba(180, 255, 140, 0.6) 65%, transparent 80%); background-size: 250% 100%; animation: tc-holo 3s linear infinite; }
.tc-mini.tc-holo { background: linear-gradient(135deg, var(--c), #ff9ad8, #9ad8ff, #b8ff9a, var(--c)); background-size: 300% 300%; animation: tc-holo 4s linear infinite; }
@keyframes tc-holo { from { background-position: 0% 50%; } to { background-position: 300% 50%; } }
/* misprint: the colors printed wrong, the picture slipped, the name doubled */
.tc.tc-mis .tc-pic { filter: hue-rotate(150deg) saturate(1.3); transform: translate(3px, -2px); }
.tc.tc-mis .tc-name { text-shadow: 2px 1px 0 rgba(200, 60, 60, 0.55), -1px -1px 0 rgba(60, 120, 200, 0.45); }
.tc-mini.tc-mis .tc-pic { filter: hue-rotate(150deg) saturate(1.3); }
/* One of a Kind: a gold frame that glows */
.tc.tc-one { --c: #e8b020; background: linear-gradient(160deg, #fff2b0, #e8b020 30%, #7a5208 60%, #fff2b0); box-shadow: 0 0 0 2px #fff2b0, 0 0 22px #e8b020; }
.tc-mini.tc-one { box-shadow: 0 0 0 2px #fff2b0, 0 0 14px #e8b020; }
.tc-mini-tags { position: absolute; top: 7px; left: 7px; z-index: 1; font: 700 9px/1 Tahoma, sans-serif; color: #fff; background: rgba(0, 0, 0, 0.55); border-radius: 3px; padding: 2px 4px; letter-spacing: 0.04em; }
/* the binder's sets */
.hc2-tabs { display: flex; gap: 4px; }
.hc2-tab { border: 1px solid #c8bca4; background: #fff; border-radius: 6px 6px 0 0; padding: 3px 12px; font: inherit; font-size: 12px; cursor: pointer; }
.hc2-tab.on { background: #2a4f94; color: #fff; border-color: #2a4f94; }
.hc2-set { margin: 0 12px 14px; padding: 10px; border: 1px solid #e0d4bc; border-radius: 8px; background: #fff; }
.hc2-set h4 { margin: 0 0 2px; font: 400 17px 'Anton', Impact, sans-serif; letter-spacing: 0.03em; color: #2a4f94; }
.hc2-set p { margin: 0 0 8px; font-size: 12px; color: #6a5a48; }
.hc2-set.done h4::after { content: '  ✓ Complete'; color: #1f6d1f; font: 700 12px Tahoma, sans-serif; }
.hc2-set-row { display: flex; gap: 8px; flex-wrap: wrap; }
.hc2-missing { width: 124px; min-height: 120px; border-radius: 8px; border: 2px dashed #c8bca4; display: flex; align-items: center; justify-content: center; color: #b0a088; font: 400 28px 'Anton', Impact, sans-serif; background: repeating-linear-gradient(45deg, #faf6ec 0 8px, #f2ecdc 8px 16px); }

/* trading up */
.hc2-trade { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.hc2-trade-h { margin: 4px 0 0; font-size: 12px; color: #4a3a2a; }
.hc2-slots { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px; border: 1px solid #e0d4bc; border-radius: 8px; background: #fff; }
.hc2-slot { width: 124px; min-height: 150px; }
.hc2-arrow { font: 400 34px 'Anton', Impact, sans-serif; color: #2a4f94; padding: 0 4px; }
.hc2-out { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #4a3a2a; max-width: 230px; }
.hc2-out b { font: 400 18px 'Anton', Impact, sans-serif; letter-spacing: 0.02em; }
.t-uncommon { color: #2f8a33; } .t-rare { color: #2a64c0; } .t-epic { color: #7a3ab0; } .t-legendary { color: #b08000; }
.hc2-warn { color: #b3261e; font-weight: 600; }
.hc2-go:not(:disabled) { background: linear-gradient(#f2d060, #e0a820); }

/* the Hog-O-Matic: a card whose hog is on the farm, or in the machine */
.tc-mini.made::before { content: attr(data-stamp); position: absolute; z-index: 2; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-12deg); white-space: nowrap; font: 400 13px/1 'Anton', Impact, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: rgba(31, 109, 31, 0.88); border: 2px solid #fff; border-radius: 4px; padding: 3px 7px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.hc2-why { color: #ffd0c8; }
.hc2-zoom .hc2-go { white-space: normal; }

/* My Account: deleting the account, and the privacy link */
.os-acc-delete { margin-top: 14px; padding-top: 10px; border-top: 1px solid #c9c2b4; display: grid; gap: 4px; justify-items: start; }
.os-acc-delete p { margin: 0; font-size: 11px; color: #5a5348; }
.os-btn.os-btn-danger { color: #a3191b; }
.os-btn.os-btn-danger:hover { box-shadow: inset 0 0 0 2px #d9534f; }
.os-btn.os-btn-danger:disabled { opacity: 0.6; cursor: default; }
.os-acc-privacy { margin: 10px 0 0; font-size: 11px; text-align: right; }
