/* Client portal — shares the site palette, but laid out as an app. */

:root {
  color-scheme: light;
  --ground: #faf9f7;
  --panel: #ffffff;
  --warm: #f3f0ea;
  --ink: #12100e;
  --ink-soft: #3a352f;
  --muted: #6f6860;
  --rule: #ddd8cf;
  --rule-soft: #eae6de;
  --accent: #b4451f;
  --accent-dark: #8f3517;
  --ok: #2f7343;
  --ok-bg: #e8f2ea;
  --ok-line: #c8e0cf;
  --warn: #8a6100;
  --warn-bg: #fbf3e0;
  --warn-line: #ecdcb4;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
.narrow { max-width: 470px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.phead { border-bottom: 1px solid var(--rule-soft); background: var(--panel); position: sticky; top: 0; z-index: 40; }
.phead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 62px; }
.phead .left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.phead svg { height: 18px; width: auto; color: var(--ink); display: block; flex: none; }
.phead .sep { width: 1px; height: 22px; background: var(--rule); flex: none; }
.phead .pname { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phead .who { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- generic bits ---------- */
.eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
h1.display { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin: 0 0 10px; letter-spacing: -.01em; }
h2.sec { font-family: var(--serif); font-weight: 400; font-size: 25px; margin: 0 0 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { background: var(--ink); color: var(--ground); text-decoration: none; }
.btn-solid { background: var(--ink); color: var(--ground); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 10.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.field { margin-bottom: 15px; }
.field label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; font-family: inherit; font-size: 15px; color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 7px; padding: 11px 13px; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180,69,31,.13); }

.msg { border-radius: 7px; padding: 12px 15px; margin-bottom: 18px; font-size: 14px; }
.msg.err { background: #fbeae5; border: 1px solid #f0cdc0; color: var(--accent-dark); }
.msg.ok { background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok); }
.msg.info { background: var(--warm); border: 1px solid var(--rule-soft); color: var(--ink-soft); }

.pill { display: inline-block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted); background: var(--warm); white-space: nowrap; }
.st-approved { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.st-changes { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.st-review { color: var(--muted); }

/* ---------- sign-in card ---------- */
.card { background: var(--panel); border: 1px solid var(--rule-soft); border-radius: 12px; padding: clamp(24px, 4vw, 36px); }
.signin { padding: clamp(48px, 10vh, 110px) 0; }
.signin svg { height: 26px; width: auto; margin-bottom: 26px; color: var(--ink); }

/* ---------- shot grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.shot-card { background: var(--panel); border: 1px solid var(--rule-soft); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.shot-card:hover { border-color: var(--rule); transform: translateY(-2px); text-decoration: none; }
.shot-card .ph { aspect-ratio: 16/10; background: var(--warm); overflow: hidden; border-bottom: 1px solid var(--rule-soft); }
.shot-card .ph img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.shot-card .meta { padding: 13px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.shot-card .t { font-weight: 600; font-size: 14.5px; color: var(--ink); line-height: 1.3; }
.shot-card .sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin-top: auto; }

/* ---------- annotator ---------- */
.review { display: grid; grid-template-columns: minmax(0,1fr) 372px; gap: 26px; align-items: start; padding: 26px 0 60px; }
@media (max-width: 1000px) { .review { grid-template-columns: 1fr; } }

.stage-wrap { background: var(--panel); border: 1px solid var(--rule-soft); border-radius: 10px; padding: 14px; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hint { font-family: var(--mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }

.stage { position: relative; display: block; line-height: 0; border-radius: 6px; overflow: hidden; border: 1px solid var(--rule-soft); }
.stage img { width: 100%; display: block; }
.stage.arm { cursor: crosshair; }
.stage.arm::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px var(--accent); pointer-events: none; }

.pin { position: absolute; width: 27px; height: 27px; margin: -13.5px 0 0 -13.5px; border-radius: 50%; background: var(--accent); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 7px rgba(0,0,0,.32); font-family: var(--mono); font-size: 11.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; line-height: 1; transition: transform .13s; }
.pin:hover, .pin.on { transform: scale(1.22); z-index: 3; }
.pin.done { background: var(--ok); }
.pin-ghost { position: absolute; width: 27px; height: 27px; margin: -13.5px 0 0 -13.5px; border-radius: 50%; background: var(--ink); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 7px rgba(0,0,0,.32); font-family: var(--mono); font-size: 11.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; animation: pulse 1.1s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.16); } }

.side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 78px; max-height: calc(100vh - 100px); }
.panel { background: var(--panel); border: 1px solid var(--rule-soft); border-radius: 10px; padding: 16px; }
.panel h3 { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 13px; font-weight: 500; }

.threads { overflow-y: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 11px; }
.thread { border: 1px solid var(--rule-soft); border-radius: 8px; padding: 12px; background: var(--panel); cursor: pointer; }
.thread:hover { border-color: var(--rule); }
.thread.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(180,69,31,.1); }
.thread.done { opacity: .58; }
.thread .head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.thread .num { width: 21px; height: 21px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 10.5px; display: flex; align-items: center; justify-content: center; flex: none; }
.thread.done .num { background: var(--ok); }
.thread .when { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-left: auto; }

.cmt { padding: 8px 0; border-top: 1px solid var(--rule-soft); font-size: 14px; color: var(--ink-soft); }
.cmt:first-of-type { border-top: 0; padding-top: 0; }
.cmt .by { font-family: var(--mono); font-size: 9.5px; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 3px; }
.cmt .by.owner { color: var(--accent); }
.cmt p { margin: 0; white-space: pre-wrap; word-wrap: break-word; }

.reply { display: flex; gap: 7px; margin-top: 10px; }
.reply input { flex: 1; min-width: 0; font-family: inherit; font-size: 13.5px; border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px; background: var(--ground); }
.reply input:focus { outline: none; border-color: var(--accent); }

.empty { text-align: center; color: var(--muted); font-size: 14px; padding: 26px 12px; }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 5px; }

/* composer for a new pin */
.composer { position: fixed; inset: 0; background: rgba(18,16,14,.45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.composer .box { background: var(--panel); border-radius: 12px; padding: 22px; max-width: 430px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,.24); }
.composer h3 { margin: 0 0 6px; font-family: var(--serif); font-weight: 400; font-size: 22px; }
.composer p.sub { margin: 0 0 15px; font-size: 13.5px; color: var(--muted); }
.composer .row { display: flex; gap: 9px; justify-content: flex-end; margin-top: 13px; }

/* ---------- admin ---------- */
.adm-grid { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 26px; align-items: start; }
@media (max-width: 940px) { .adm-grid { grid-template-columns: 1fr; } }
.plist { display: flex; flex-direction: column; gap: 12px; }
.prow { background: var(--panel); border: 1px solid var(--rule-soft); border-radius: 10px; padding: 15px 17px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.prow .nm { font-weight: 600; font-size: 15.5px; }
.prow .cl { font-size: 13px; color: var(--muted); }
.prow .sp { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.linkbox { display: flex; gap: 7px; margin-top: 11px; width: 100%; }
.linkbox input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 11.5px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--warm); color: var(--ink-soft); }

.up-drop { border: 2px dashed var(--rule); border-radius: 10px; padding: 26px 18px; text-align: center; color: var(--muted); font-size: 14px; background: var(--panel); cursor: pointer; transition: border-color .15s, background .15s; }
.up-drop:hover, .up-drop.over { border-color: var(--accent); background: var(--warm); }

.pfoot { border-top: 1px solid var(--rule-soft); margin-top: 40px; padding: 22px 0 34px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
