* { box-sizing: border-box; }
body { margin: 0; background: #EDF0F4; color: #1C2530; font-family: "Barlow", Arial, Helvetica, sans-serif; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; font-size: 14px; }

.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.card { background: #fff; border: 1px solid #DDE3EA; border-radius: 10px; padding: 28px; box-shadow: 0 6px 24px rgba(15,30,55,.08); }
.logo { font-family: "Barlow Condensed", "Arial Narrow", Arial, sans-serif; font-weight: 800; font-size: 26px; letter-spacing: 3px; }
.logo span { color: #2E7FC2; }

.btn { border: 1px solid #C7D0DA; background: #fff; border-radius: 7px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; color: #1C2530; }
.btn:hover { background: #F2F5F9; }
.btn.primary { background: #2E7FC2; border-color: #2E7FC2; color: #fff; }
.btn.primary:hover { background: #266DA8; }
.btn.small { padding: 4px 10px; font-size: 12px; border-radius: 5px; }
.btn.danger { color: #A33A3A; }

.topbar { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid #E1E6EC; display: flex; align-items: center; gap: 12px; padding: 10px 18px; }
.topbar .spacer { flex: 1; }
.statuschip { font-size: 12px; color: #5B6470; }

.shell { max-width: 1060px; margin: 0 auto; padding: 26px 20px 80px; }
.h1 { font-family: "Barlow Condensed", "Arial Narrow", Arial, sans-serif; font-weight: 800; font-size: 30px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 4px; }
.sub { color: #5B6470; font-size: 14px; margin: 0 0 18px; }
.cols { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.col { flex: 1; min-width: 340px; }
.panel { background: #fff; border: 1px solid #DDE3EA; border-radius: 10px; padding: 18px; }
.panel h2 { font-family: "Barlow Condensed", "Arial Narrow", Arial, sans-serif; font-weight: 700; font-size: 17px; text-transform: uppercase; letter-spacing: 1.5px; margin: 0 0 12px; color: #38414D; }
.row { display: flex; gap: 8px; align-items: center; }
.list { display: flex; flex-direction: column; }
.gamerow, .boardrow { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #EEF1F5; font-size: 13.5px; }
.gamerow .when, .boardrow .when { color: #5B6470; font-size: 12px; width: 108px; flex-shrink: 0; }
.gamerow .name, .boardrow .name { flex: 1; font-weight: 600; }
.muted { color: #8A93A1; font-size: 12px; }
.pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #EEF3FA; color: #2E7FC2; }
.pill.ready { background: #E7F5EC; color: #237A4B; }
.pill.working { background: #FDF3E3; color: #9A6B14; }

.seg { display: inline-flex; border: 1px solid #C7D0DA; border-radius: 7px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 7px 14px; font-size: 13px; font-weight: 600; color: #5B6470; }
.seg button.on { background: #2E7FC2; color: #fff; }

.searchwrap { position: relative; flex: 1; }
.searchwrap input { width: 100%; padding: 8px 10px; border: 1px solid #C7D0DA; border-radius: 7px; }
.results { position: absolute; top: 40px; left: 0; right: 0; background: #fff; border: 1px solid #C7D0DA; border-radius: 7px; max-height: 260px; overflow: auto; z-index: 30; box-shadow: 0 10px 24px rgba(15,30,55,.12); }
.results div { padding: 8px 10px; font-size: 13.5px; cursor: pointer; }
.results div:hover { background: #F2F5F9; }

.overlay { position: fixed; inset: 0; background: rgba(20,30,45,.45); display: flex; align-items: center; justify-content: center; z-index: 100; }
.overlay .card { width: 420px; text-align: center; }
.progressbar { height: 8px; background: #E4E9EF; border-radius: 4px; overflow: hidden; margin-top: 14px; }
.progressbar div { height: 100%; background: #2E7FC2; transition: width .3s; }

.warnbar { background: #FDF3E3; border: 1px solid #F0DCB4; border-radius: 8px; padding: 10px 14px; margin: 12px 0; font-size: 13px; color: #7A5410; }
.warnbar .witem { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.warnbar .witem .t { flex: 1; }

.editwrap { display: flex; gap: 18px; align-items: flex-start; justify-content: center; padding: 18px; }
.boardholder { flex-shrink: 0; }
.drawer { width: 330px; flex-shrink: 0; background: #fff; border: 1px solid #DDE3EA; border-radius: 10px; padding: 14px; position: sticky; top: 64px; max-height: calc(100vh - 90px); overflow: auto; }
.drawer h3 { font-family: "Barlow Condensed","Arial Narrow",Arial,sans-serif; font-weight: 700; font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 4px; color: #8A93A1; }
.drawer .who { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.fact { border: 1px solid #E4E9EF; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.fact .t { font-size: 12.5px; line-height: 1.35; }
.fact .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; font-size: 10.5px; color: #8A93A1; }
.fact .add { color: #2E7FC2; font-weight: 700; cursor: pointer; font-size: 11px; }
.fact .add.on { color: #237A4B; cursor: default; }
.drawer .free { width: 100%; padding: 7px 9px; border: 1px solid #C7D0DA; border-radius: 7px; font-size: 12.5px; margin-top: 4px; }
.hint { font-size: 11.5px; color: #8A93A1; line-height: 1.4; margin-top: 10px; }

[contenteditable="true"] { outline: none; border-radius: 2px; }
[contenteditable="true"]:hover { box-shadow: 0 0 0 1px #9CC3E8 inset; }
[contenteditable="true"]:focus { box-shadow: 0 0 0 2px #2E7FC2 inset; background: #F4F9FE; }
.ph { color: #A6B0BC; }

@media print {
  body { background: #fff; }
  .topbar, .drawer, .warnbar, .noprint { display: none !important; }
  .editwrap { padding: 0; }
  .boardholder { margin: 0; }
  @page { size: letter portrait; margin: 0; }
  .board { box-shadow: none !important; }
  [contenteditable="true"]:hover, [contenteditable="true"]:focus { box-shadow: none; background: transparent; }
  .ph { visibility: hidden !important; }
}
