@font-face { font-family: 'Academy'; src: url('/brand/Academy-Regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Academy'; src: url('/brand/Academy-Italic.otf') format('opentype'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ground: #260E00;
  --ink: #E2D5C3;
  --bright: #EDE6DA;
  --body: #F0E9DE;
  --soft: rgba(226, 213, 195, .62);
  --faint: rgba(226, 213, 195, .16);
  --line: rgba(226, 213, 195, .14);
  --wash: rgba(226, 213, 195, .04);
  --bad: #E8A48A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: 'Academy', Georgia, serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
a { color: var(--ink); }
a:hover { color: var(--bright); }
button, input, select, textarea { font-family: inherit; color: var(--ink); font-size: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.lbl { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.muted { color: var(--soft); }
.small { font-size: 13px; }
.link { background: none; border: 0; padding: 0; color: var(--soft); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--bright); }
.button { display: inline-block; padding: 12px 20px; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--ground); text-decoration: none; }
.error { margin: 0 24px 12px; padding: 10px 14px; border: 1px solid var(--bad); border-radius: 8px; color: var(--bad); font-size: 14px; }

.signin { max-width: 420px; margin: 18vh auto 0; padding: 0 16px; text-align: center; }
.signin .chequy { height: 56px; }
.signin h1 { font-weight: 400; font-size: 34px; margin: 18px 0 8px; }
.signin p { color: var(--soft); line-height: 1.5; margin: 0 0 24px; }

.shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.rail { width: 264px; flex-shrink: 0; display: flex; flex-direction: column; gap: 18px; padding: 28px 18px 20px; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
.mark { display: flex; align-items: center; gap: 12px; padding: 0 8px 6px; }
.mark img { height: 36px; width: auto; }
.mark .word { height: 13px; opacity: .9; }
.group { display: flex; flex-direction: column; gap: 2px; }
.group .lbl { padding: 0 12px 8px; }
.group .link { align-self: flex-start; margin: 6px 12px 0; }
.grow { flex: 1; }
.rail-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 8px; color: rgba(226, 213, 195, .7); font-size: 15px; text-decoration: none; }
.rail-item:hover { color: var(--ink); background: rgba(226, 213, 195, .05); }
.rail-item.on { background: rgba(226, 213, 195, .1); color: var(--bright); }
.rail-item.boxed { border: 1px solid rgba(226, 213, 195, .18); }
.count { font-size: 12px; color: var(--soft); }
.count.lit { color: var(--bright); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bright); box-shadow: 0 0 8px rgba(237, 230, 218, .5); display: inline-block; }
.side { display: inline-flex; align-items: center; gap: 8px; }
.me { display: flex; align-items: center; gap: 12px; padding: 6px 12px 0; }
.me-mark { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--faint); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.me-name { font-size: 14px; }
.me-role { font-size: 12px; color: var(--soft); }
.foot { display: flex; justify-content: space-between; padding: 0 12px; font-size: 13px; }
.foot a { color: var(--soft); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.view { flex: 1; min-width: 0; }
.phone-nav { display: none; }

.head { padding: 28px 40px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.head-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head h1 { margin: 0; font-weight: 400; font-size: 30px; }
.head .facts { font-size: 14px; color: var(--soft); margin-top: 4px; }
.strip { display: flex; flex-wrap: wrap; gap: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.tile { display: flex; flex-direction: column; gap: 6px; min-width: 150px; padding: 14px 16px; border: 1px solid var(--faint); border-radius: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; background: none; text-align: left; }
.tile:hover { border-color: rgba(226, 213, 195, .6); background: var(--wash); }
.tile.on { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.tile .n { font-size: 26px; line-height: 1; }
.tile .l { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .6; }
.chip { padding: 8px 14px; border: 1px solid var(--faint); border-radius: 999px; text-decoration: none; color: rgba(226, 213, 195, .7); font-size: 13px; flex-shrink: 0; background: none; }
.chip:hover, .chip.on { color: var(--bright); border-color: rgba(226, 213, 195, .6); }

.talk { padding: 30px 40px 40px; display: flex; flex-direction: column; gap: 30px; }
.greet { font-size: 30px; line-height: 1.3; color: var(--body); max-width: 760px; margin-top: 18vh; }
.msg { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.msg p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--body); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .who { display: flex; align-items: center; gap: 10px; }
.you { align-self: flex-end; align-items: flex-end; text-align: right; }
.you p { color: rgba(226, 213, 195, .72); }
.bars { display: flex; align-items: center; gap: 3px; height: 18px; }
.bars i { display: block; width: 3px; height: 6px; border-radius: 2px; background: var(--bright); opacity: .75; }
.bars i:nth-child(2) { height: 12px; } .bars i:nth-child(3) { height: 9px; } .bars i:nth-child(4) { height: 16px; } .bars i:nth-child(5) { height: 8px; } .bars i:nth-child(6) { height: 13px; } .bars i:nth-child(7) { height: 6px; }
.bars.talking i { animation: talk 1s ease-in-out infinite; }
.bars.talking i:nth-child(2n) { animation-delay: .2s; } .bars.talking i:nth-child(3n) { animation-delay: .4s; }
.bars.quiet i { height: 4px; opacity: .4; }
@keyframes talk { 50% { transform: scaleY(.4); } }

.card { border: 1px solid var(--faint); border-radius: 10px; background: var(--wash); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; max-width: 760px; overflow-x: auto; }
.card-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card .big { font-size: 20px; color: var(--body); }
.card .text { font-size: 16px; line-height: 1.5; color: var(--body); white-space: pre-wrap; }
.cmd { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.cmd button, .cmd a { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: rgba(226, 213, 195, .6); background: none; border: 0; padding: 4px 0; }
.cmd button::before, .cmd a::before { content: '· '; }
.cmd .lit { color: var(--bright); text-shadow: 0 0 12px rgba(237, 230, 218, .45); }
.cmd button:hover, .cmd a:hover { color: var(--bright); }
.cmd button:disabled { opacity: .4; cursor: default; }
.facts4 { display: flex; flex-wrap: wrap; gap: 14px 34px; }
.facts4 > div { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.stepbar { display: flex; gap: 4px; }
.stepbar span { flex: 1; height: 3px; border-radius: 2px; background: var(--faint); }
.stepbar span.done { background: var(--ink); }
.stepbar span.now { background: var(--bright); box-shadow: 0 0 8px rgba(237, 230, 218, .5); }
.stepbar span.fail { background: var(--bad); }
.row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }

table { border-collapse: collapse; width: 100%; }
td, th { padding: 10px 12px 10px 0; text-align: left; font-weight: 400; font-size: 15px; vertical-align: top; }
td { border-top: 1px dotted rgba(226, 213, 195, .22); }
th { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); padding-top: 0; white-space: nowrap; }
th button { background: none; border: 0; padding: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
tr.pick { cursor: pointer; }
tr.pick:hover td { color: var(--bright); }

.listview, .recview, .pageview { padding: 24px 40px 40px; display: flex; flex-direction: column; gap: 18px; }
.bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.bar .left { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { background: none; border: 1px solid var(--faint); border-radius: 999px; padding: 8px 14px; font-size: 13px; min-width: 0; width: 200px; }
.colpick { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--soft); }
.colpick label { display: inline-flex; gap: 6px; align-items: center; }
.tablewrap { overflow-x: auto; }
.rec-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.field { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px dotted rgba(226, 213, 195, .22); font-size: 15px; }
.field .v { text-align: right; overflow-wrap: anywhere; white-space: pre-wrap; }
.field input, .field select, .field textarea { background: rgba(226, 213, 195, .06); border: 1px solid var(--faint); border-radius: 6px; padding: 6px 8px; max-width: 100%; }
.field textarea { width: 100%; min-height: 80px; }
.ev { display: flex; gap: 14px; font-size: 14px; padding: 6px 0; }
.ev .d { color: var(--soft); min-width: 74px; }
h2 { font-weight: 400; font-size: 26px; margin: 4px 0 0; }

.line { position: sticky; bottom: 0; background: linear-gradient(to top, var(--ground) 70%, rgba(38, 14, 0, 0)); padding: 14px 40px 22px; }
.line form { display: flex; align-items: center; gap: 6px; max-width: 820px; border: 1px solid var(--faint); border-radius: 999px; padding: 4px 6px; background: var(--ground); }
.line input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 17px; padding: 10px 8px; }
.line input::placeholder { color: var(--soft); font-style: italic; }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; color: rgba(226, 213, 195, .6); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-btn:hover, .icon-btn.on { color: var(--bright); background: rgba(226, 213, 195, .08); }

.panel { width: 380px; flex-shrink: 0; border-left: 1px solid var(--line); padding: 28px 24px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.panel .title { font-size: 20px; color: var(--body); }
.step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px dotted rgba(226, 213, 195, .22); }
.step .n { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--faint); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.step .n.done { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.step .n.fail { border-color: var(--bad); color: var(--bad); }
.step .t { font-size: 15px; overflow-wrap: anywhere; }
.step .m { font-size: 13px; color: var(--soft); margin-top: 2px; overflow-wrap: anywhere; }
.step pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; max-height: 240px; overflow: auto; background: rgba(0, 0, 0, .2); padding: 8px; border-radius: 6px; }

.review-part { display: flex; flex-direction: column; gap: 4px; }
.rline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 6px 8px; border-radius: 6px; font-size: 17px; line-height: 1.5; color: var(--body); }
.rline:hover { background: var(--wash); }
.rline .add { opacity: .5; }
.rline .comments { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.rcomment { font-size: 14px; color: var(--ink); border-left: 2px solid var(--faint); padding-left: 10px; }
.review-img { max-width: 100%; border-radius: 8px; border: 1px solid var(--faint); }
.commentbox { display: flex; gap: 8px; grid-column: 1 / -1; }
.commentbox input { flex: 1; min-width: 0; background: rgba(226, 213, 195, .06); border: 1px solid var(--faint); border-radius: 6px; padding: 6px 8px; }

.stage { padding: 40px 24px; display: flex; flex-direction: column; gap: 24px; min-height: 60vh; justify-content: center; }
.stage .speaker { display: flex; align-items: center; gap: 12px; }
.stage .now { font-size: 26px; line-height: 1.4; color: var(--body); white-space: pre-wrap; }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--bright); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tlist { display: flex; flex-direction: column; }
.tlist a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 4px; border-top: 1px dotted rgba(226, 213, 195, .22); text-decoration: none; font-size: 17px; }
.tlist a .s { color: var(--soft); font-size: 14px; }
.tlist a .n { color: var(--bright); font-size: 14px; }
.day { margin-top: 10px; }

@media (max-width: 1100px) {
  .panel { position: fixed; right: 0; top: 0; z-index: 20; background: var(--ground); box-shadow: -10px 0 30px rgba(0, 0, 0, .4); max-width: 100vw; }
}

@media (max-width: 760px) {
  .rail { display: none; }
  .phone-nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--ground); z-index: 10; }
  .mark-sm img { height: 28px; }
  .phone-links { display: flex; gap: 16px; font-size: 15px; }
  .phone-links a { text-decoration: none; color: var(--soft); }
  .phone-links a.on { color: var(--bright); }
  .head { padding: 18px 16px 14px; }
  .head h1 { font-size: 24px; }
  .talk { padding: 20px 16px 24px; gap: 24px; }
  .greet { font-size: 24px; margin-top: 10vh; }
  .msg p { font-size: 17px; }
  .card { padding: 16px; }
  .listview, .recview, .pageview { padding: 16px; }
  .rec-grid { grid-template-columns: minmax(0, 1fr); }
  .line { padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); }
  .panel { width: 100vw; padding: 20px 16px; }
  .tile { min-width: 128px; }
  .strip { flex-wrap: nowrap; }
  .search { width: 100%; }
  .error { margin: 0 16px 12px; }
}
