/* play.chickengostudio.com: the studio's Play Console desk. Brand colors from the logo: coral #F34949, egg #FFD96A. */
@font-face { font-family: "Be Vietnam Pro"; font-weight: 400; font-display: swap; src: url(fonts/be-vietnam-pro-vietnamese-400-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 400; font-display: swap; src: url(fonts/be-vietnam-pro-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 600; font-display: swap; src: url(fonts/be-vietnam-pro-vietnamese-600-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 600; font-display: swap; src: url(fonts/be-vietnam-pro-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 700; font-display: swap; src: url(fonts/be-vietnam-pro-vietnamese-700-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-weight: 700; font-display: swap; src: url(fonts/be-vietnam-pro-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --bg: #eef0f3;
  --surface: #ffffff;
  --sunken: #f6f7f9;
  --ink: #1b1f27;
  --muted: #5a6170;
  --line: #d8dce3;
  --coral: #f34949;
  --coral-ink: #c42d2d;
  --coral-soft: #fde6e6;
  --egg: #ffd96a;
  --egg-ink: #7a5a00;
  --egg-soft: #fff4d1;
  --good: #1d7f52;
  --good-soft: #dff3e8;
  --focus: #1f5fd1;
  --star-off: #d3d7de;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15181d; --surface: #1d2128; --sunken: #181b21; --ink: #e8eaee; --muted: #a2a9b6; --line: #333944;
    --coral: #ff6b6b; --coral-ink: #ff8f8f; --coral-soft: #3a2224; --egg: #ffd96a; --egg-ink: #ffd96a; --egg-soft: #3a3320;
    --good: #5cc795; --good-soft: #1d3329; --focus: #7fa8ff; --star-off: #434a56; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: inherit; text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; line-height: 1.3; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar */
.top {
  background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 1rem; padding: .6rem 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; text-decoration: none; margin-right: auto; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--coral); position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--egg); right: 5px; bottom: 5px; }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a { text-decoration: none; padding: .4rem .7rem; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.nav a:hover { color: var(--ink); background: var(--sunken); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--egg-soft); }
.nav .count { display: inline-block; min-width: 1.4em; padding: 0 .35em; margin-left: .3em; border-radius: 99px; background: var(--coral); color: #fff; font-size: .75rem; text-align: center; }
.sync-state { font-size: .82rem; color: var(--muted); }

@media (max-width: 640px) {
  .top { gap: .4rem .8rem; }
  .sync-state { display: none; }
  .nav a { padding: .35rem .55rem; }
}
.wrap { max-width: 1240px; margin: 0 auto; padding: 1.25rem 16px 3rem; }
.head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }

.flash { padding: .7rem .9rem; border-radius: var(--radius); margin-bottom: 1rem; background: var(--good-soft); border-left: 4px solid var(--good); }
.flash.error { background: var(--coral-soft); border-left-color: var(--coral); }
.notice { padding: .9rem 1rem; border-radius: var(--radius); background: var(--egg-soft); border-left: 4px solid var(--egg); margin-bottom: 1rem; }

/* ---------- buttons and forms */
.btn {
  display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 600; font-size: .9rem;
  padding: .5rem .9rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; line-height: 1.2;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn.primary:hover { background: var(--coral-ink); border-color: var(--coral-ink); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn.quiet:hover { color: var(--ink); background: var(--sunken); }
.btn[disabled] { opacity: .55; cursor: progress; }
label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: .3rem; }
input[type=text], input[type=password], input[type=number], input[type=email], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: .5rem .65rem; width: 100%;
}
textarea { resize: vertical; line-height: 1.5; }
.field { margin-bottom: 1rem; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: .3rem; font-weight: 400; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .3rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1.1rem; }
.grid2 { display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr); }
.grid2 > *, .layout > * { min-width: 0; }
.wrap-any, .text, .existing, code, .hint, .panel p { overflow-wrap: anywhere; }
@media (min-width: 900px) { .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ---------- stars */
.stars { display: inline-flex; gap: 2px; vertical-align: -2px; }
.stars i { width: 13px; height: 13px; background: var(--star-off); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.stars i.on { background: #f5b800; }

/* ---------- overview table */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 600; color: var(--muted); font-size: .82rem; background: var(--sunken); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
tbody tr:hover { background: var(--sunken); }
.app-name { font-weight: 600; text-decoration: none; }
.app-name:hover { text-decoration: underline; }
.pkg { display: block; font-size: .78rem; color: var(--muted); }
tr.off td { color: var(--muted); }

/* rate against Google's threshold: the bar is the share of the threshold, red past it */
.rate { display: inline-flex; align-items: center; gap: .45rem; justify-content: flex-end; }
.rate .bar { width: 54px; height: 6px; border-radius: 3px; background: var(--sunken); border: 1px solid var(--line); overflow: hidden; }
.rate .bar b { display: block; height: 100%; background: var(--good); }
.rate.warn .bar b { background: var(--egg); }
.rate.bad { color: var(--coral-ink); font-weight: 700; }
.rate.bad .bar b { background: var(--coral); }
.pill { display: inline-block; padding: .05rem .5rem; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--sunken); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.hot { background: var(--coral-soft); border-color: transparent; color: var(--coral-ink); }
.pill.egg { background: var(--egg-soft); border-color: transparent; color: var(--egg-ink); }
.pill.ok { background: var(--good-soft); border-color: transparent; color: var(--good); }

.totals { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.totals div { min-width: 120px; }
.totals b { display: block; font-size: 1.45rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.totals span { font-size: .85rem; color: var(--muted); }

/* ---------- reviews */
.layout { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .layout { grid-template-columns: 230px minmax(0, 1fr); } }
.filters { display: flex; flex-direction: column; gap: .9rem; }
.filters fieldset { border: 0; padding: 0; margin: 0; }
.filters legend { font-weight: 600; font-size: .85rem; margin-bottom: .35rem; color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: .3rem; }
.seg a { text-decoration: none; padding: .3rem .6rem; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: .85rem; }
.seg a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }

.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
.review.r1, .review.r2 { border-left: 4px solid var(--coral); }
.review.r3 { border-left: 4px solid var(--egg); }
.review-head { display: flex; flex-wrap: wrap; gap: .35rem .9rem; align-items: center; padding: .75rem 1rem .4rem; font-size: .85rem; color: var(--muted); }
.review-head .who { color: var(--ink); font-weight: 600; font-size: .95rem; }
.review-head .app { font-weight: 600; color: var(--ink); text-decoration: none; }
.review-body { display: grid; gap: .2rem 1.4rem; grid-template-columns: 1fr; padding: .2rem 1rem .8rem; }
@media (min-width: 760px) { .review-body.two { grid-template-columns: 1fr 1fr; } }
.review-body .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.review-body .vi { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.review-body .lang { font-size: .75rem; font-weight: 600; color: var(--muted); display: block; margin-bottom: .1rem; }
.ai-line { padding: .45rem 1rem; font-size: .88rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: baseline; border-top: 1px dashed var(--line); }
.ai-line.flag { background: var(--coral-soft); }
.existing { padding: .7rem 1rem; background: var(--sunken); border-top: 1px solid var(--line); font-size: .92rem; }
.existing .text { white-space: pre-wrap; }

/* the composer: the one place with personality: a 350-character meter in egg yellow */
.composer { padding: .8rem 1rem 1rem; background: var(--sunken); border-top: 1px solid var(--line); }
.composer textarea { min-height: 5.5rem; background: var(--surface); }
.meter { display: flex; align-items: center; gap: .6rem; margin: .4rem 0 .7rem; font-size: .8rem; color: var(--muted); }
.meter .track { flex: 1; height: 8px; border-radius: 4px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.meter .fill { height: 100%; width: 0; background: var(--egg); transition: width .15s ease; }
.meter.over { color: var(--coral-ink); font-weight: 700; }
.meter.over .fill { background: var(--coral); }
.draft-vi { font-size: .86rem; color: var(--muted); margin: -.2rem 0 .7rem; white-space: pre-wrap; }
.composer .redo { display: none; margin-bottom: .7rem; }
.composer .redo.open { display: flex; gap: .5rem; }
.composer .redo input { flex: 1; }
.status-line { font-size: .85rem; margin-left: auto; }
.status-line.error { color: var(--coral-ink); font-weight: 600; }
.status-line.ok { color: var(--good); font-weight: 600; }

.pager { display: flex; gap: .5rem; justify-content: center; margin-top: 1rem; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- charts (inline SVG built in PHP) */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .limit { stroke: var(--coral); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .series { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.chart .series.alt { stroke: var(--muted); stroke-width: 1.5; }
.chart .area { fill: var(--egg); opacity: .35; }
.chart .bars rect { fill: var(--egg); }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .limit-label { fill: var(--coral-ink); font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.legend { display: flex; gap: 1rem; font-size: .82rem; color: var(--muted); margin-top: .4rem; flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: .35rem; background: var(--ink); }
.legend i.alt { background: var(--muted); }
.legend i.limit { background: var(--coral); }
.dist { display: grid; grid-template-columns: auto 1fr auto; gap: .35rem .6rem; align-items: center; font-size: .88rem; }
.dist .track { height: 10px; border-radius: 5px; background: var(--sunken); overflow: hidden; }
.dist .track b { display: block; height: 100%; background: var(--egg); }

.issue { padding: .65rem 0; border-bottom: 1px solid var(--line); }
.issue:last-child { border-bottom: 0; }
.issue code { font-size: .82rem; overflow-wrap: anywhere; }

/* ---------- log */
.log-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: .2rem 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.log-row .lvl-error { color: var(--coral-ink); font-weight: 600; }
.log-row .lvl-warn { color: var(--egg-ink); font-weight: 600; }
.log-row .lvl-sent { color: var(--good); font-weight: 600; }

.login { max-width: 360px; margin: 12vh auto; padding: 0 16px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
