/* Saltwire Tattoo dashboard. Sizes are rem so the text-size steps scale the UI. */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17.6px; }
html[data-font="0"] { font-size: 16px; }
html[data-font="1"] { font-size: 17.6px; }
html[data-font="2"] { font-size: 20px; }
html[data-font="3"] { font-size: 22.4px; }

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07060a;
  --ink: #f3eee4;
  --ink-2: #d4cbbd;
  --ink-3: #c4b9a8;
  --surface: rgba(14, 11, 13, .72);
  --line: rgba(243, 238, 228, .58);
  --field: rgba(8, 6, 8, .55);
  --bubble-in: rgba(22, 16, 18, .88);
  --bubble-out: #f3eee4;
  --bubble-out-ink: #1c1412;
  --accent: #e23a2f;
  --accent-ink: #ffb1a6;
  --ok-fg: #b7e4c0;
  --wait-fg: #e6b15a;
  --wait-bg: #e6b15a;
  --wait-bg-ink: #1b1200;
  --stop-bg: #c4322a;
  --stop-fg: #fff;
  --focus: #ffb1a6;
  --hover: rgba(255, 255, 255, .07);
  --nav-on-bg: linear-gradient(180deg, #faf6ef, #e5d8c4);
  --nav-on-ink: #1c1412;
  --nav-glow: inset 0 1px 0 rgba(255,255,255,.85), 0 0 16px rgba(226,58,47,.38);
  --btn-bg: linear-gradient(180deg, #faf6ef 0%, #e7dccb 100%);
  --btn-ink: #1c1412;
  --btn-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 0 0 1px rgba(226,58,47,.28), 0 8px 26px rgba(226,58,47,.42), 0 12px 28px rgba(0,0,0,.36);
  --btn2-bg: rgba(16, 12, 14, .5);
  --btn2-line: rgba(243, 238, 228, .58);
  --ghost-line: rgba(243, 238, 228, .58);
  --btn2-ink: #f3eee4;
  --btn2-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 8px 22px rgba(0,0,0,.28);
  --btn2-hover: rgba(255, 255, 255, .08);
  --wave: #f3eee4;
  --mark-sub: #ff7d72;
  --shadow: 0 16px 36px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.16);
  --chip: #1a1412;
  --bar: rgba(10, 8, 10, .72);
  --pill: #f3eee4;
  --pill-ink: #1c1412;
  --cap: #ffb1a6;
  --dot-quiet: #8a8074;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3ece3;
  --ink: #1c1412;
  --ink-2: #3f362f;
  --ink-3: #5c534c;
  --surface: rgba(255, 250, 244, .82);
  --line: rgba(28, 20, 18, .62);
  --field: rgba(255, 250, 244, .92);
  --bubble-in: #fffaf4;
  --bubble-out: #1c1412;
  --bubble-out-ink: #faf6ef;
  --accent: #a32018;
  --accent-ink: #8e2218;
  --ok-fg: #1e4d32;
  --wait-fg: #6a4708;
  --wait-bg: #e6b15a;
  --wait-bg-ink: #1b1200;
  --stop-bg: #9e2a22;
  --stop-fg: #fff;
  --focus: #8e2218;
  --hover: rgba(28, 20, 18, .06);
  --nav-on-bg: #1c1412;
  --nav-on-ink: #faf6ef;
  --nav-glow: 0 8px 18px rgba(28, 20, 18, .12);
  --btn-bg: #1c1412;
  --btn-ink: #faf6ef;
  --btn-shadow: 0 8px 22px rgba(142, 34, 24, .22);
  --btn2-bg: rgba(255, 250, 244, .88);
  --btn2-line: rgba(28, 20, 18, .62);
  --ghost-line: rgba(28, 20, 18, .62);
  --btn2-ink: #1c1412;
  --btn2-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  --btn2-hover: rgba(28, 20, 18, .05);
  --wave: #1c1412;
  --mark-sub: #8e2218;
  --shadow: 0 12px 28px rgba(80, 50, 30, .1);
  --chip: #fffaf4;
  --bar: rgba(255, 250, 244, .78);
  --pill: #1c1412;
  --pill-ink: #faf6ef;
  --cap: #ffb1a6;
  --dot-quiet: #8a7568;
}

html, body { margin: 0; padding: 0; }
body {
  min-height: 100%;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { border: 0; }
h1, h2, p, blockquote { margin: 0; }
a { color: inherit; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
::placeholder { color: var(--ink-3); opacity: 1; }
::selection { background: rgba(226, 58, 47, .28); }

body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

html[data-theme="dark"] body::before {
  background:
    linear-gradient(180deg, rgba(7,6,10,.9) 0%, rgba(7,6,10,.72) 14%, rgba(7,6,10,.52) 34%, rgba(7,6,10,.48) 68%, rgba(7,6,10,.78) 88%, rgba(7,6,10,.92) 100%),
    url("img/bg-irezumi-dragon.jpg") 72% 26% / cover no-repeat;
  filter: blur(28px) saturate(.84) brightness(.64);
  transform: scale(1.06);
}
html[data-theme="dark"] body::after {
  background:
    linear-gradient(180deg, rgba(7,6,10,.4), rgba(7,6,10,.28) 40%, rgba(7,6,10,.48)),
    url("img/bg-irezumi-peony.jpg") right -120px top 220px / 480px auto no-repeat,
    url("img/bg-irezumi-koi.jpg") left -150px bottom -80px / 680px auto no-repeat,
    url("img/bg-irezumi-dragon.jpg") 70% 30% / cover no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 76% 70% at 50% 46%, transparent 34%, rgba(0,0,0,.55) 62%, #000 90%);
  mask-image: radial-gradient(ellipse 76% 70% at 50% 46%, transparent 34%, rgba(0,0,0,.55) 62%, #000 90%);
  filter: blur(1.5px) saturate(.86) brightness(.62);
}
html[data-theme="light"] body::before {
  background:
    linear-gradient(180deg, rgba(243,236,227,.94) 0%, rgba(243,236,227,.86) 30%, rgba(243,236,227,.82) 70%, rgba(243,236,227,.93) 100%),
    url("img/bg-irezumi-dragon.jpg") 72% 26% / cover no-repeat;
  filter: blur(30px) saturate(.4) brightness(1.38);
  transform: scale(1.06);
}
html[data-theme="light"] body::after {
  background:
    linear-gradient(180deg, rgba(243,236,227,.62), rgba(243,236,227,.45)),
    url("img/bg-irezumi-peony.jpg") right -80px top 180px / 400px auto no-repeat,
    url("img/bg-irezumi-koi.jpg") left -110px bottom -50px / 520px auto no-repeat;
  opacity: .4;
  filter: saturate(.32) brightness(1.45) contrast(.95);
  -webkit-mask-image: radial-gradient(ellipse 78% 72% at 50% 46%, transparent 46%, #000 90%);
  mask-image: radial-gradient(ellipse 78% 72% at 50% 46%, transparent 46%, #000 90%);
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}
html[data-theme="light"] .grain { opacity: .035; }

.app {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 100dvh;
}
.main { flex: 1 1 auto; min-width: 0; padding: 1rem 1.15rem 1.4rem; container-type: inline-size; container-name: studio; }
.side, .top, .tabs { display: none; }

.side {
  width: 15.5rem;
  flex: 0 0 15.5rem;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: auto;
  padding: 1.05rem .8rem 1rem;
  flex-direction: column;
  gap: .75rem;
  background: var(--bar);
  border-right: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  backdrop-filter: blur(20px) saturate(1.35);
}
.sidenav { display: grid; gap: .25rem; }
.sidefoot { margin-top: auto; display: grid; gap: .65rem; padding-top: .6rem; }
.fine { font-size: .75rem; color: var(--ink-3); letter-spacing: .04em; }

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  text-decoration: none;
  color: var(--ink);
  padding: .15rem .2rem .35rem;
}
.mk { width: 2.55rem; height: 2.55rem; flex: none; color: var(--wave); }
html[data-theme="dark"] .mk { filter: drop-shadow(0 0 8px rgba(226,58,47,.35)); }
.wm {
  font-family: "Avenir Next Condensed", "Avenir Next", "Helvetica Neue", sans-serif;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
  min-width: 0;
}
.wm small {
  display: block;
  margin-top: .32rem;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: .62rem;
  letter-spacing: .2em;
  font-weight: 650;
  color: var(--mark-sub);
}

.top {
  position: sticky;
  top: 0;
  z-index: 4;
  gap: .6rem;
  padding: .75rem .9rem;
  margin: -1rem -1.15rem .8rem;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}
.tools { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 0; }
.top .fontctl { flex: 1; min-width: 0; }

.tabs {
  position: fixed;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: .25rem .25rem calc(.3rem + env(safe-area-inset-bottom));
  background: var(--bar);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}
.tab {
  min-height: max(44px, 2.75rem);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  text-decoration: none;
  color: var(--ink-2);
  font-size: .72rem;
  font-weight: 700;
  border-radius: .9rem;
  position: relative;
  padding: .3rem .15rem;
}
.tab svg { width: 1.15rem; height: 1.15rem; }
.tab[aria-current="page"] {
  color: var(--nav-on-ink);
  background: var(--nav-on-bg);
  box-shadow: var(--nav-glow);
}
.tab .badge { position: absolute; top: .08rem; left: calc(50% + .5rem); }

.navbtn {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: max(44px, 2.75rem);
  padding: .35rem .8rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  min-width: 0;
}
.navbtn svg { width: 1.15rem; height: 1.15rem; flex: none; }
.navbtn span:not(.badge) { min-width: 0; }
.navbtn .badge { margin-left: auto; }
.navbtn[aria-current="page"] {
  background: var(--nav-on-bg);
  color: var(--nav-on-ink);
  font-weight: 750;
  box-shadow: var(--nav-glow);
}
.navbtn:hover { background: var(--hover); }
.navbtn[aria-current="page"]:hover { background: var(--nav-on-bg); }
.navbtn:active, .tab:active, .segbtn:active, .chip:active, .row:active { transform: scale(.985); }

.badge {
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 .4rem;
  border-radius: 999px;
  background: var(--stop-bg);
  color: var(--stop-fg);
  font-size: .72rem;
  font-weight: 750;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* one button system */
.btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  min-height: max(44px, 3.05rem);
  padding: .55rem 1.15rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  font-weight: 750;
  letter-spacing: -.011em;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  max-width: 100%;
}
.btn svg { width: 1.15rem; height: 1.15rem; flex: none; }
.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-ink);
  box-shadow: var(--btn-shadow);
}
.btn-secondary {
  background: var(--btn2-bg);
  color: var(--btn2-ink);
  border-color: var(--btn2-line);
  box-shadow: var(--btn2-shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ghost-line); }
.btn-icon {
  width: max(44px, 3.05rem);
  height: max(44px, 3.05rem);
  min-width: max(44px, 3.05rem);
  padding: 0;
  border-radius: 50%;
  flex: none;
}
.btn-icon.btn-ghost { border-color: var(--line); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn-secondary:hover:not(:disabled),
.btn-icon.btn-secondary:hover:not(:disabled) { background: var(--btn2-hover); border-color: var(--btn2-line); }
.btn-ghost:hover:not(:disabled),
.btn-icon.btn-ghost:hover:not(:disabled) { background: var(--hover); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled {
  opacity: .42;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
  transform: none;
}

.fontctl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  min-width: 0;
}
.fontctl-val {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  min-width: 3.2rem;
  text-align: center;
  letter-spacing: -.02em;
}

.seg, .choice, .actions, .decide, .quick, .filters {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  min-width: 0;
  max-width: 100%;
}
.quick { display: grid; }
.quick .chip, .filters .chip, .actions .btn, .decide .btn, .segbtn {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}
.quick .chip { justify-content: flex-start; text-align: left; }
.prod {
  display: flex;
  width: 100%;
  max-width: 22rem;
  margin: 0 0 .85rem;
  padding: .2rem;
  gap: .15rem;
  border-radius: 999px;
  background: var(--bar);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
}
.segbtn, .chip {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  min-height: max(44px, 2.75rem);
  min-width: max(44px, 2.75rem);
  padding: .4rem .9rem;
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  cursor: pointer;
}
.prod .segbtn { flex: 1 1 auto; }
.segbtn[aria-pressed="true"], .chip[aria-pressed="true"] {
  background: var(--nav-on-bg);
  color: var(--nav-on-ink);
  font-weight: 750;
  box-shadow: var(--nav-glow);
}
.segbtn:hover, .chip:hover { background: var(--hover); }
.segbtn[aria-pressed="true"]:hover, .chip[aria-pressed="true"]:hover { background: var(--nav-on-bg); }
.chip { background: var(--chip); border-color: var(--line); max-width: 100%; }
.btn-icon, .tick { min-width: max(44px, 3.05rem); }
.filters .chip { min-width: max(44px, 2.75rem); }

.card, .pane, .mo, .lib, .note, .quote {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  min-width: 0;
}
.card, .note, .quote { border-radius: 1.3rem; padding: 1rem 1.05rem; }
.card.held { box-shadow: inset 5px 0 0 var(--accent), var(--shadow); }
.card + .card { margin-top: .7rem; }

.head { display: grid; gap: .28rem; margin: .15rem 0 .85rem; min-width: 0; }
.eyebrow {
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--accent-ink);
}
h1 {
  font-size: 2.15rem;
  line-height: 1.02;
  letter-spacing: -.034em;
  font-weight: 650;
}
h2 { font-size: 1.2rem; letter-spacing: -.02em; font-weight: 700; }
.lede { color: var(--ink-2); max-width: 42rem; }
.lede b, .lib b { color: var(--ink); font-weight: 750; }
.label {
  display: block;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--ink-3);
}
.stack { display: grid; gap: .85rem; min-width: 0; }
.narrow { max-width: 42rem; }

.kpis { display: grid; gap: .7rem; grid-template-columns: minmax(0, 1fr); }
.kpi { display: grid; gap: .5rem; align-content: start; min-height: 7.2rem; }
.num {
  font-size: 2.55rem;
  line-height: 1.05;
  letter-spacing: -.03em;
  font-weight: 650;
}
.num.hot { color: var(--accent); }
html[data-theme="light"] .num.hot { color: var(--accent-ink); }
html[data-theme="dark"] .num.hot { color: #ff5a4e; }
.demo-pill {
  justify-self: start;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 750;
  padding: .28rem .55rem;
  border-radius: 999px;
  background: var(--wait-bg);
  color: var(--wait-bg-ink);
}
.cols { display: grid; gap: .7rem; min-width: 0; }
.line {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .7rem;
  align-items: baseline;
  padding: .75rem 0;
  border-top: 1px solid var(--line);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.card .line:first-of-type { border-top: 0; padding-top: .35rem; }
a.line { min-height: max(44px, 2.75rem); border-radius: .7rem; }
a.line:hover { background: var(--hover); }
.when { font-weight: 750; min-width: 3.4rem; font-variant-numeric: tabular-nums; }
.what { flex: 1 1 8rem; min-width: 0; }
.what b { display: block; font-weight: 750; }
.what span, .sub { display: block; color: var(--ink-2); font-size: .92rem; }
.status { display: inline-flex; align-items: center; gap: .4rem; font-weight: 750; font-size: .92rem; }
.status i, .dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--dot-quiet);
  flex: none;
  display: inline-block;
}
.status.ok { color: var(--ok-fg); }
.status.ok i { background: var(--ok-fg); }
.status.wait { color: var(--wait-fg); }
.status.wait i { background: var(--wait-fg); }
html[data-theme="dark"] .status.ok { color: var(--ok-fg); }
.actions .btn { flex: 1 1 10rem; }

.lib {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .85rem;
  padding: .6rem .85rem;
  border-radius: 1.15rem;
  margin: .2rem 0 .85rem;
}
.frames { display: flex; align-items: center; }
.frames img {
  width: 2.25rem;
  height: 3.5rem;
  object-fit: cover;
  border-radius: .7rem;
  border: 2px solid var(--ink);
  margin-left: -.5rem;
  box-shadow: 0 6px 14px rgba(0,0,0,.28);
}
.frames img:first-child { margin-left: 0; }
.moments { display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr); }
.mo { position: relative; border-radius: 1.35rem; padding: .4rem; container-type: inline-size; container-name: card; }
.mo.on {
  border-width: 2px;
  border-color: #8e2218;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 0 0 1px rgba(255, 90, 78, .4),
    0 0 0 6px rgba(226, 58, 47, .14),
    0 0 22px rgba(226, 58, 47, .38),
    var(--shadow);
}
html[data-theme="dark"] .mo.on { border-color: #ffb1a6; }
.frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(max(44px, 3.05rem) + .55rem);
  grid-template-rows: auto minmax(3.15rem, 1fr) auto;
  align-items: start;
  aspect-ratio: 16 / 10;
  border-radius: 1.05rem;
  overflow: hidden;
  background: #14110f;
  padding: .5rem .55rem .6rem;
  column-gap: .35rem;
}
@container card (max-width: 16rem) {
  .frame { aspect-ratio: 12 / 11; }
}
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.3), transparent 28%, transparent 48%, rgba(0,0,0,.72));
  pointer-events: none;
}
.chip-time, .dur, .leftout, .play, .cap { position: relative; z-index: 1; }
.chip-time, .dur, .leftout {
  border-radius: 999px;
  font-weight: 700;
  font-size: .8rem;
  line-height: 1.15;
}
.chip-time {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: .35em;
  row-gap: .08em;
  padding: .36rem .7rem;
  background: #080608;
  color: #fff;
}
.chip-time b { color: #ffb1a6; white-space: nowrap; }
.chip-time .at { white-space: nowrap; }
.when-short { display: none; }
@container card (max-width: 16rem) {
  .when-long { display: none; }
  .when-short { display: inline; }
}
.dur {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  align-self: end;
  max-width: 100%;
  padding: .28rem .55rem;
  background: #080608;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.leftout {
  grid-column: 2;
  grid-row: 1;
  justify-self: stretch;
  align-self: start;
  max-width: 100%;
  padding: .32rem .4rem;
  background: #fff;
  color: #1c1412;
  text-align: center;
  white-space: normal;
}
.play {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: center;
  align-self: center;
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #080608;
  color: #fff;
  display: grid;
  place-items: center;
  pointer-events: none;
  box-shadow: 0 0 0 2px #080608;
}
.play svg { width: 1.2rem; height: 1.2rem; margin-left: .12rem; }
.cap {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 12px;
  color: #fff;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
  max-width: 100%;
}
.cap::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -6px -8px;
  border-radius: 13px;
  background: #080608;
}
.tick {
  position: absolute;
  top: .7rem;
  right: .7rem;
  z-index: 3;
  background: #080608;
  color: transparent;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #080608;
}
.tick[aria-pressed="true"] {
  background: #e23a2f;
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 2px #080608, 0 0 16px rgba(226, 58, 47, .9);
}
.tick svg { width: 1.25rem; height: 1.25rem; }
.bd { display: grid; gap: .55rem; padding: .75rem .55rem .45rem; }
.bd p { color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tags i {
  font-style: normal;
  font-size: .8rem;
  font-weight: 650;
  padding: .28rem .7rem;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--line);
  color: var(--ink);
}
.mo.dead .frame img { filter: saturate(.12); opacity: .72; }
.mo.dead .play { display: none; }
.decide { margin-top: .85rem; }
.decide .btn-primary { flex: 1 1 16rem; }
.decide .btn-secondary { flex: 0 1 10rem; }

.draft p { margin-top: .35rem; }
.help { color: var(--ink-2); font-size: .95rem; }

.split { display: grid; gap: .7rem; min-width: 0; }
.split[data-pane="list"] .pane-thread { display: none; }
.split[data-pane="thread"] .pane-list { display: none; }
.pane {
  border-radius: 1.3rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.pane-head, .thread-top, .replybox { padding: .75rem; }
.pane-head, .replybox { display: grid; gap: .5rem; }
.thread-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
  border-bottom: 1px solid var(--line);
}
.thread-top .who { display: grid; gap: .1rem; min-width: 0; flex: 1 1 10rem; }
.thread-top h2 { font-size: 1.25rem; }
.back { flex: none; }
.list-body, .thread-body { min-width: 0; }
.list-body { display: grid; align-content: start; }
.row {
  position: relative;
  display: grid;
  gap: .2rem;
  width: auto;
  min-height: max(44px, 4.4rem);
  margin: 3px 8px;
  padding: .75rem .9rem;
  text-align: left;
  text-decoration: none;
  color: inherit;
  border: 0;
  background: transparent;
  border-radius: 15px;
}
.row:hover { background: var(--hover); }
.row.on { background: var(--hover); }
.row.on::before {
  content: "";
  position: absolute;
  left: .5rem;
  top: 50%;
  width: 5px;
  height: 1.15rem;
  border-radius: 999px;
  background: var(--accent);
  transform: translateY(-50%);
  pointer-events: none;
}
.row.unread .who { font-weight: 800; }
.row-top, .who-line { display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: baseline; min-width: 0; }
.who { font-weight: 750; min-width: 0; }
.ago { margin-left: auto; color: var(--ink-3); font-size: .85rem; font-variant-numeric: tabular-nums; }
.kind {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--ink-3);
}
.row.unread .kind { color: var(--accent-ink); }
.row.unread .dot { background: var(--accent); }
.preview {
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.searchrow { display: flex; gap: .4rem; align-items: center; min-width: 0; }
.searchrow input { flex: 1 1 auto; min-width: 0; }
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
input[type="search"], input[type="text"], select, textarea {
  width: 100%;
  min-height: max(44px, 2.75rem);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  padding: 0 .9rem;
}
textarea {
  border-radius: 1rem;
  padding: .75rem .9rem;
  min-height: 7rem;
  resize: vertical;
  line-height: 1.4;
}
.replybox textarea { min-height: 5.2rem; }
.field { display: grid; gap: .35rem; font-weight: 700; font-size: .92rem; min-width: 0; }
.err { color: var(--accent-ink); font-weight: 700; min-height: 0; }
.quick .chip {
  font-weight: 650;
  background: var(--chip);
  padding: .5rem 1.05rem;
}

.thread-body {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: .85rem .85rem 1rem;
}
.daymark {
  align-self: center;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--ink-3);
  padding: .2rem 0;
}
.bubble { display: grid; gap: .18rem; max-width: min(28rem, 88%); min-width: 0; }
.bubble.in { align-self: start; }
.bubble.out { align-self: end; justify-items: end; }
.bubble p {
  margin: 0;
  padding: .7rem .85rem;
  background: var(--bubble-in);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 1.15rem 1.15rem 1.15rem .4rem;
  overflow-wrap: anywhere;
}
.bubble.out p {
  background: var(--bubble-out);
  color: var(--bubble-out-ink);
  border-color: transparent;
  border-radius: 1.15rem 1.15rem .4rem 1.15rem;
}
.bubble time, .demo-note { font-size: .75rem; color: var(--ink-3); padding: 0 .3rem; font-weight: 650; }
.demo-note { color: var(--accent-ink); }
.empty { padding: 1rem .9rem 1.2rem; color: var(--ink-2); }

.quote p { margin-top: .35rem; color: var(--ink); }
.note b { display: block; margin-bottom: .2rem; }
.set-block { display: grid; gap: .55rem; }
.set-block + .set-block { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.sample {
  font-size: 1.15rem;
  padding: .85rem 1rem;
  border-radius: 1rem;
  background: var(--chip);
  border: 1px solid var(--line);
}

.toast {
  position: fixed;
  z-index: 8;
  left: 1rem;
  right: 1rem;
  bottom: calc(5.5rem + env(safe-area-inset-bottom));
  margin-inline: auto;
  max-width: 28rem;
  padding: .75rem 1rem;
  border-radius: 999px;
  background: var(--pill);
  color: var(--pill-ink);
  font-weight: 750;
  text-align: center;
  box-shadow: var(--shadow);
}
.toast[hidden] { display: none !important; }
.noscript { position: relative; z-index: 2; padding: 1rem; }

@media (max-width: 767px) {
  .top { display: grid; }
  .tabs { display: grid; }
  .main { padding-bottom: calc(5.6rem + env(safe-area-inset-bottom)); }
  .decide .btn-primary, .decide .btn-secondary { flex: 1 1 100%; }
  h1 { font-size: 2rem; }
}
@media (min-width: 768px) {
  .side { display: flex; }
  .main { padding: 1.2rem 1.35rem 2rem; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: 2.55rem; }
  .toast { bottom: 1.25rem; }
}
@media (min-width: 1100px) {
  .cols { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .split {
    grid-template-columns: minmax(15rem, 21rem) minmax(0, 1fr);
    align-items: start;
  }
  .split[data-pane="list"] .pane-thread,
  .split[data-pane="thread"] .pane-list { display: flex; }
  .back { display: none; }
}
@container studio (min-width: 24rem) {
  .moments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .moments { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  h1 { font-size: 3rem; }
  .main { padding: 1.35rem 1.7rem 2.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
