/* Тех-бой — зелёный ЭЛТ-экран (вариант А «Классика») */
@font-face { font-family: 'Plex'; src: local('IBM Plex Mono'); }
:root {
  --c: #3cff7a; --d: #1a6a35; --bg: #071109; --bg2: #0c1c10; --red: #ff6b5a; --amb: #ffd35a;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--c); font: 15px/1.4 'IBM Plex Mono', 'Plex', ui-monospace, Consolas, monospace;
  text-shadow: 0 0 6px #3cff7a88; -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(0deg, #0000 0 2px, #0004 2px 3px); }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 51;
  background: radial-gradient(ellipse at center, #0000 60%, #0008 100%); }
button, input, textarea, select { font: inherit; color: inherit; text-shadow: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
.wrap { max-width: 560px; margin: 0 auto; min-height: 100%; padding: 14px 16px calc(80px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }

.tabs { display: flex; justify-content: space-between; border-bottom: 2px solid var(--c); padding-bottom: 6px; font-weight: 700; letter-spacing: 1px; position: sticky; top: 0; background: var(--bg); z-index: 10; padding-top: 6px; }
.tabs button { opacity: .45; padding: 4px 2px; font-weight: 700; letter-spacing: 1px; }
.tabs button.on { opacity: 1; }
.stabs { display: flex; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.stabs button { opacity: .55; padding: 2px 6px; border: 1px solid transparent; }
.stabs button.on { opacity: 1; border-color: var(--c); }

.item { padding: 9px 8px; display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; border: 1px solid transparent; }
.item.sel { background: var(--c); color: var(--bg); text-shadow: none; }
.item .t { flex: 1; min-width: 0; }
.item .dep { font-size: 12px; opacity: .75; }
.mark { width: 24px; flex: none; font-weight: 700; }
.urg { animation: bl 1s steps(2) infinite; }
@keyframes bl { 50% { opacity: .2; } }

.box { border: 1px solid var(--c); padding: 12px; }
.box.red { border-color: var(--red); color: var(--red); text-shadow: 0 0 6px #ff6b5a88; }
.bar { height: 10px; border: 1px solid var(--c); position: relative; }
.bar i { position: absolute; top: 1px; bottom: 1px; left: 1px; background: var(--c); max-width: calc(100% - 2px); }
.btn { border: 2px solid var(--c); padding: 11px; text-align: center; font-weight: 700; letter-spacing: 1px; display: block; width: 100%; }
.btn.f { background: var(--c); color: var(--bg); text-shadow: none; }
.btn:disabled { opacity: .4; }
.btn:active { transform: translateY(1px); }
.row { display: flex; gap: 8px; } .row > * { flex: 1; }
.muted { opacity: .6; } .s { font-size: 12px; } .b { font-weight: 700; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--d); }
.kv:last-child { border-bottom: 0; } .kv > :last-child { text-align: right; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--c); padding: 5px 10px; font-size: 13px; }
.chips button.on { background: var(--c); color: var(--bg); text-shadow: none; }
.chips.col { flex-direction: column; } .chips.col button { text-align: left; }
.lbl { font-size: 13px; margin-bottom: -6px; letter-spacing: 1px; }
input[type=text], input[type=number], input[type=datetime-local], input[type=date], input[type=time], textarea, select {
  width: 100%; background: var(--bg2); border: 1px solid var(--c); padding: 10px; border-radius: 0; outline: none; }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 2px #3cff7a44; }
textarea { min-height: 84px; resize: vertical; }
::placeholder { color: var(--c); opacity: .4; }
.foot { position: fixed; left: 0; right: 0; bottom: 0; background: var(--bg); border-top: 1px solid var(--d); z-index: 10; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); }
.foot > div { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; font-size: 12px; }
.foot .bar { flex: 1; }
.photo { width: 100%; max-height: 260px; object-fit: contain; border: 1px solid var(--c); background: #000; display: block; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumbs button { border: 1px dashed var(--c); padding: 6px 8px; font-size: 12px; }
.ph { border: 1px dashed var(--c); padding: 18px; text-align: center; font-size: 13px; display: block; width: 100%; }
.empty { text-align: center; padding: 30px 0; opacity: .6; }
.err { color: var(--red); text-shadow: 0 0 6px #ff6b5a88; font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--c); color: var(--bg); text-shadow: none; padding: 10px 16px; font-weight: 700; z-index: 60; max-width: 90%; text-align: center; }
.toast.bad { background: var(--red); }
.sheet { position: fixed; inset: 0; background: #000c; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet > div { background: var(--bg); border-top: 2px solid var(--c); width: 100%; max-width: 560px; max-height: 92%; overflow: auto; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.big { font-size: 40px; font-weight: 700; text-align: center; line-height: 1; }
.stars { display: flex; justify-content: center; gap: 6px; font-size: 34px; }
.stars button { opacity: .35; } .stars button.on { opacity: 1; }
h1 { font-size: 18px; letter-spacing: 1px; }

/* план */
.days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; gap: 3px; }
.days button { padding: 5px 0; border: 1px solid var(--d); }
.days button.on { background: var(--c); color: var(--bg); text-shadow: none; font-weight: 700; }
.days button.today { border-color: var(--c); }
.days i { display: block; font-style: normal; font-size: 11px; }
.slot { display: flex; gap: 8px; font-size: 13px; min-height: 34px; border-top: 1px dashed var(--d); padding-top: 4px; }
.slot > b { width: 44px; opacity: .6; font-weight: 400; flex: none; }
.slot > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ev { border-left: 3px solid var(--c); padding: 3px 8px; background: #3cff7a14; text-align: left; width: 100%; }
.ev.cyc { border-left-style: dotted; }
.ev.done { opacity: .45; text-decoration: line-through; }
.ev.late { border-left-color: var(--red); }
.mon { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; font-size: 12px; text-align: center; }
.mon .h { opacity: .6; padding: 2px 0; }
.mon button { height: 46px; border: 1px solid var(--d); position: relative; padding-top: 3px; }
.mon button.t { border-color: var(--c); }
.mon button.on { background: var(--c); color: var(--bg); text-shadow: none; }
.mon u { text-decoration: none; position: absolute; bottom: 4px; left: 0; right: 0; font-size: 10px; letter-spacing: 1px; }
.log > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed var(--d); }
.plus { color: var(--c); } .minus { color: var(--red); text-shadow: 0 0 6px #ff6b5a88; }
