:root {
  --paper: #f4efe6;
  --paper-2: #ece5d8;
  --card: #fbf8f2;
  --ink: #1d1b18;
  --ink-2: #4a453e;
  --muted: #7a7266;
  --line: #d9d0c1;
  --brick: #b8472a;
  --brick-dark: #973a21;
  --brick-soft: #f3e1d8;
  --good: #2f6b45;
  --good-soft: #e2ece2;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.015em; line-height: 1.12; margin: 0; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
svg { display: block; }

.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.bar { max-width: 1040px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.logo svg { width: 24px; height: 24px; }
.signout { background: none; border: 0; color: var(--muted); font-size: 14px; padding: 12px 4px; cursor: pointer; min-height: 44px; }
.signout:hover { color: var(--ink); }

main { max-width: 1040px; margin: 0 auto; padding: 36px 20px 60px; }
.foot { max-width: 1040px; margin: 0 auto; padding: 24px 20px 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* sign in */
.signin { max-width: 440px; margin: 7vh auto 0; }
.signin h1 { font-size: clamp(34px, 8vw, 44px); }
.signin p.lede { color: var(--ink-2); margin: 14px 0 28px; font-size: 17px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
input[type=email], input[type=text], textarea, select {
  width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 16px; min-height: 48px;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brick); outline-offset: 1px; border-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brick); color: #fff; border: 0; text-decoration: none; font-weight: 600; font-size: 16px; padding: 13px 24px; min-height: 48px; border-radius: 999px; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--brick-dark); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.full { width: 100%; }
.note { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; color: var(--ink-2); }
.err { color: var(--brick-dark); font-size: 14px; margin-top: 10px; }

/* project */
.hello { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.hello .kicker { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.hello h1 { font-size: clamp(32px, 6.5vw, 50px); }
.hello .now { font-family: var(--serif); font-size: 19px; color: var(--ink-2); max-width: 420px; }

.track { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.track li { position: relative; padding-top: 16px; font-size: 13px; color: var(--muted); }
.track li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 3px; background: var(--paper-2); }
.track li.done::before { background: var(--ink); }
.track li.now::before { background: var(--brick); }
.track li.done, .track li.now { color: var(--ink); }
.track li.now { font-weight: 600; }

.grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
.col { display: grid; gap: 20px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; min-width: 0; }
.card h2 { font-size: 24px; margin-bottom: 6px; }
.card .sub { color: var(--ink-2); margin-bottom: 18px; }

.preview { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; text-decoration: none; }
.preview .chrome { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--paper-2); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.preview .chrome i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.preview .chrome span { margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview .frame { position: relative; height: 320px; overflow: hidden; }
.preview iframe { position: absolute; top: 0; left: 0; width: 200%; height: 200%; border: 0; transform: scale(.5); transform-origin: 0 0; pointer-events: none; }
.preview .open { position: absolute; right: 12px; bottom: 12px; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 9px 16px; font-size: 14px; font-weight: 600; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.price { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 4px; }
.price b { font-family: var(--serif); font-size: 44px; font-weight: 500; letter-spacing: -.02em; }
.price span { color: var(--muted); }
.paid { display: flex; gap: 12px; align-items: center; background: var(--good-soft); color: var(--good); border-radius: 12px; padding: 12px 14px; font-weight: 600; margin-bottom: 12px; }
.paid svg { width: 22px; height: 22px; flex: none; }
.hist { list-style: none; margin: 12px 0 0; padding: 0; font-size: 14px; color: var(--ink-2); }
.hist li { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.fine { font-size: 13px; color: var(--muted); margin-top: 12px; }

details.check summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; }
details.check summary::-webkit-details-marker { display: none; }
details.check summary .chev { transition: transform .2s; width: 18px; height: 18px; }
details.check[open] summary .chev { transform: rotate(180deg); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--brick-soft); color: var(--brick-dark); }
.badge.ok { background: var(--good-soft); color: var(--good); }
.check form { margin-top: 14px; }

.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; border: 1.5px dashed var(--line); border-radius: 14px; padding: 24px 16px; cursor: pointer; color: var(--ink-2); min-height: 120px; }
.drop:hover, .drop.over { border-color: var(--brick); background: #fff; }
.drop svg { width: 26px; height: 26px; color: var(--brick); }
.drop input { display: none; }
.files { list-style: none; padding: 0; margin: 14px 0 0; font-size: 14px; }
.files li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.files li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files li span:last-child { color: var(--muted); flex: none; }

.thread { display: grid; gap: 10px; margin-bottom: 16px; max-height: 460px; overflow-y: auto; padding-right: 2px; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; font-size: 15px; }
.msg time { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.msg.you { justify-self: end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 4px; }
.msg.you time { color: #b8b0a3; }
.msg.studio { justify-self: start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.empty { color: var(--muted); font-size: 15px; }

.card.rev { border-color: var(--brick); box-shadow: 0 0 0 3px var(--brick-soft); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 12px; font-size: 15px; transition: .25s; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.skeleton { height: 280px; border-radius: 18px; background: linear-gradient(90deg, var(--paper-2), var(--card), var(--paper-2)); background-size: 200% 100%; animation: sh 1.4s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

@media (max-width: 820px) {
  main { padding: 26px 16px 48px; }
  .bar { padding: 0 16px; }
  .grid { display: flex; flex-direction: column; }
  .col { display: contents; }
  .o1 { order: 1; } .o2 { order: 2; } .o3 { order: 3; } .o4 { order: 4; } .o5 { order: 5; }
  .card { padding: 18px; border-radius: 16px; }
  .track { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .preview .frame { height: 240px; }
  .preview iframe { width: 300%; height: 300%; transform: scale(.3333); }
  .msg { max-width: 94%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.items { display: grid; gap: 0; border-top: 1px solid var(--line); }
.item { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.item b { display: block; font-weight: 600; }
.item small { display: block; color: var(--muted); font-size: 13px; }
.item .amt { font-family: var(--serif); font-size: 22px; }
.btn.sm { padding: 10px 16px; min-height: 44px; font-size: 14px; }
@media (max-width: 400px) { .item { grid-template-columns: 1fr auto; } .item > :last-child { grid-column: 1 / -1; justify-self: stretch; text-align: center; } }
.btn svg { width: 18px; height: 18px; flex: none; }
