:root {
  --navy: #14213D;
  --navy-2: #1F2E52;
  --orange: #F2711C;
  --orange-2: #D95B0B;
  --cream: #FFF4E6;
  --paper: #FFFDF9;
  --ink: #1B2540;
  --muted: #5E6885;
  --line: #EBDFCC;
  --teal: #2FA39A;
  --yellow: #FFC94D;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --r: 20px;
  --shadow: 0 1px 0 rgba(20, 33, 61, .04), 0 12px 32px -16px rgba(20, 33, 61, .28);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.5 var(--sans); color: var(--ink);
  background:
    radial-gradient(900px 420px at 88% -80px, rgba(242, 113, 28, .16), transparent 70%),
    radial-gradient(700px 380px at -8% 30%, rgba(47, 163, 154, .10), transparent 70%),
    var(--cream);
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px 40px; }

/* ── top bar ── */
.top { display: flex; align-items: center; gap: 16px; padding: 12px 20px; max-width: 1180px; width: 100%; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-mark { width: 40px; height: 40px; border-radius: 11px; }
.brand-word { font-weight: 800; font-size: 25px; letter-spacing: -.035em; }
.top-tag { color: var(--muted); font-size: 14px; padding-left: 16px; border-left: 1px solid var(--line); }
.top-new { flex: none; }
.keychip {
  appearance: none; border: 0; cursor: pointer; margin-left: auto; display: inline-flex; align-items: center; gap: 7px; border-radius: 999px;
  padding: 7px 13px; font-size: 13px; font-weight: 700; color: var(--muted); background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1.5px var(--line);
}
.keychip:hover { color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }
.keychip.is-own { color: #14665f; background: rgba(47, 163, 154, .16); box-shadow: inset 0 0 0 1.5px rgba(47, 163, 154, .55); }
.keychip:focus-visible, .linkbtn:focus-visible { outline: 3px solid rgba(47, 163, 154, .7); outline-offset: 2px; }
.linkbtn { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; color: var(--orange-2); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ── buttons, chips ── */
.btn {
  appearance: none; border: 0; cursor: pointer; border-radius: 999px; padding: 11px 20px; font-weight: 700; font-size: 15px; line-height: 1.2;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn:focus-visible, .chip:focus-visible, .drop:focus-visible, .sample:focus-visible, .seg-btn:focus-visible, .react-btn:focus-visible, .endorse:focus-visible, .say:focus-visible, input:focus-visible {
  outline: 3px solid rgba(47, 163, 154, .7); outline-offset: 2px;
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 16px -8px rgba(242, 113, 28, .9); }
.btn-primary:hover { background: var(--orange-2); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-ghost { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px rgba(20, 33, 61, .22); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn[disabled] { opacity: .55; cursor: default; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  appearance: none; cursor: pointer; border: 0; border-radius: 999px; padding: 7px 13px; font-size: 13.5px; font-weight: 600;
  background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); transition: background .15s, color .15s, box-shadow .15s;
}
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--orange); }
.chip.is-on { background: var(--navy); color: #fff; box-shadow: none; }
.chips-sm .chip { padding: 5px 11px; font-size: 12.5px; }

/* ── landing ── */
.hero { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 48px; align-items: center; padding: 22px 0 10px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-2); background: rgba(242, 113, 28, .12); padding: 6px 12px; border-radius: 999px; }
.hero h1 { font: 700 clamp(34px, 4.6vw, 56px)/1.04 var(--serif); letter-spacing: -.02em; color: var(--navy); margin: 14px 0 12px; text-wrap: balance; }
.lede { font-size: 18px; color: #3b4664; max-width: 33em; }
.proof { margin-top: 12px; color: var(--muted); font-size: 14.5px; }
.proof b { color: var(--navy); font-size: 16px; }

.uploader { background: var(--paper); border-radius: 26px; padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.drop {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; cursor: pointer;
  border: 2.5px dashed rgba(242, 113, 28, .55); border-radius: 18px; padding: 22px 16px 20px; background: rgba(242, 113, 28, .05);
  transition: background .15s, border-color .15s, transform .15s;
}
.drop:hover, .drop.is-over { background: rgba(242, 113, 28, .12); border-color: var(--orange); }
.drop.is-over { transform: scale(1.01); }
.drop-mark { width: 58px; height: 58px; border-radius: 16px; margin-bottom: 6px; transform: rotate(-6deg); }
.drop-title { font: 700 22px/1.2 var(--serif); color: var(--navy); }
.drop-sub { color: var(--muted); font-size: 14px; }
.drop-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.privacy { font-size: 12.5px; color: var(--muted); text-align: center; margin: 10px 4px 0; }
.opts { display: grid; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.field { display: grid; gap: 6px; }
.field-label { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.field-label i { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; }
.field input { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 13px; font-size: 16px; width: 100%; }
.err { margin-top: 12px; color: #a3260b; background: #ffe9df; border-radius: 12px; padding: 10px 13px; font-size: 14px; font-weight: 600; }

.samples { margin-top: 22px; }
.samples h2 { font: 700 17px/1.2 var(--sans); color: var(--navy); margin-bottom: 10px; }
.sample-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.sample {
  appearance: none; border: 0; padding: 0; cursor: pointer; text-align: center; background: var(--paper); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line); transition: transform .16s ease, box-shadow .16s ease;
}
.sample:hover { transform: translateY(-4px) rotate(-1.5deg); box-shadow: 0 16px 28px -16px rgba(20, 33, 61, .55); }
.sample img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: #f1e6d4; }
.sample span { display: block; padding: 6px 4px 8px; font-size: 12.5px; font-weight: 700; color: var(--navy); line-height: 1.2; }

/* ── loading ── */
.loading { display: grid; place-items: center; padding: 8vh 0; }
.load-card { width: min(520px, 100%); background: var(--paper); border-radius: 26px; padding: 34px 28px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--line); }
.load-avatar { width: 132px; height: 132px; margin: 0 auto 18px; border-radius: 50%; padding: 5px; background: conic-gradient(var(--orange), var(--yellow), var(--teal), var(--orange)); animation: spin 2.4s linear infinite; }
.load-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--paper); animation: spin 2.4s linear infinite reverse; background: #f1e6d4; }
.load-card h2 { font: 700 26px/1.2 var(--serif); color: var(--navy); }
.load-line { min-height: 3em; margin-top: 10px; color: #3b4664; font-size: 16px; }
.bar { height: 8px; border-radius: 99px; background: #f1e6d4; overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; width: 4%; border-radius: 99px; background: linear-gradient(90deg, var(--orange), var(--yellow)); transition: width .5s ease; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── result ── */
.result { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 12px; }
.result > * { min-width: 0; }
.share { position: sticky; top: 14px; background: var(--paper); border-radius: 24px; padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.share-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.share-head h2 { font: 700 18px/1.2 var(--serif); color: var(--navy); }
.seg { display: inline-flex; background: #f3e9d8; border-radius: 999px; padding: 3px; flex: none; }
.seg-btn { appearance: none; border: 0; background: transparent; cursor: pointer; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; color: var(--muted); }
.seg-btn.is-on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(20, 33, 61, .2); }
.card-frame { position: relative; border-radius: 16px; overflow: hidden; background: var(--navy); aspect-ratio: 1; display: grid; place-items: center; }
.card-frame.is-wide { aspect-ratio: 1200 / 630; }
.card-frame img { width: 100%; height: 100%; object-fit: contain; }
.card-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20, 33, 61, .72); color: #fff; font-weight: 700; text-align: center; padding: 20px; backdrop-filter: blur(3px); }
.card-busy span { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.notice { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 11px 13px; border-radius: 14px; background: rgba(255, 201, 77, .26); color: #5b4300; font-size: 14px; font-weight: 600; }
.notice p { flex: 1; min-width: 0; }
.notice .btn { padding: 8px 14px; font-size: 13.5px; flex: none; }
.notice.is-bad { background: #ffe9df; color: #a3260b; }
.actions { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.actions .btn { grid-column: span 3; padding: 10px 2px; font-size: 14px; }
.actions #againBtn { grid-column: span 6; }
.actions .btn-primary, .actions .btn-navy { font-size: 16.5px; padding: 13px 8px; }
.actions .btn-primary { grid-column: 1 / -1; }
.actions.has-copy .btn-primary, .actions.has-copy .btn-navy { grid-column: span 6; }
.again-vibe { display: grid; gap: 7px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.meta { margin-top: 10px; font-size: 12px; color: var(--muted); }

.profile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.p-head, .p-card { background: var(--paper); border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.p-head { overflow: hidden; }
.p-cover { height: 150px; background: linear-gradient(120deg, var(--navy), #2b3f73 55%, var(--orange)); background-size: cover; background-position: center; }
.p-avatar { width: 136px; height: 136px; border-radius: 50%; margin: -72px 0 0 24px; border: 5px solid var(--paper); background: #f1e6d4; overflow: hidden; position: relative; box-shadow: 0 0 0 3px var(--orange); }
.p-avatar img { width: 100%; height: 100%; object-fit: cover; }
.p-id { padding: 10px 24px 20px; }
.p-id h1 { font: 700 30px/1.15 var(--serif); color: var(--navy); }
.p-headline { font-size: 17px; margin-top: 4px; color: var(--ink); }
.p-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.p-open { display: inline-block; margin-top: 12px; background: rgba(47, 163, 154, .14); color: #14665f; border-radius: 12px; padding: 7px 12px; font-size: 14px; }
.p-open span { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 11.5px; margin-right: 4px; }
.p-open b { font-weight: 600; }
.p-card { padding: 20px 24px; }
.p-card h3 { font: 700 19px/1.2 var(--serif); color: var(--navy); margin-bottom: 10px; }
.post-author { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.post-author img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; background: #f1e6d4; }
.post-author div { min-width: 0; flex: 1; }
.post-author b { display: block; line-height: 1.2; }
.post-author span { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.say { appearance: none; border: 0; cursor: pointer; width: 36px; height: 36px; border-radius: 50%; background: #f3e9d8; color: var(--navy); display: grid; place-items: center; flex: none; }
.say:hover, .say.is-on { background: var(--navy); color: #fff; }
.post-body p { font-size: 17.5px; line-height: 1.5; margin-bottom: .7em; white-space: pre-line; }
.post-tags { color: var(--orange-2); font-weight: 700; font-size: 15px; word-spacing: .3em; }
.post-react { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.react-stack { display: inline-flex; }
.react-stack img { width: 26px; height: 26px; margin-right: -7px; filter: drop-shadow(0 1px 1px rgba(20, 33, 61, .25)); }
.react-count { margin-left: 8px; font-weight: 700; color: var(--ink); }
.react-right { margin-left: auto; }
.react-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.react-btn { appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; background: #f6ecdb; border-radius: 999px; padding: 6px 12px 6px 7px; font-size: 13.5px; font-weight: 700; color: var(--navy); transition: transform .12s; }
.react-btn img { width: 26px; height: 26px; }
.react-btn:hover { background: #f0e1c8; }
.react-btn.pop img { animation: pop .4s ease; }
@keyframes pop { 40% { transform: scale(1.6) rotate(-14deg); } }
.comments { display: grid; gap: 10px; margin-top: 14px; }
.comments li { display: grid; grid-template-columns: 38px 1fr; gap: 10px; }
.c-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 16px; }
.c-bub { background: #f8efe0; border-radius: 4px 16px 16px 16px; padding: 9px 13px; min-width: 0; }
.c-bub b { font-size: 14px; }
.c-bub i { display: block; font-style: normal; color: var(--muted); font-size: 12.5px; margin-bottom: 3px; }
.c-bub p { font-size: 15px; }
.exp { display: grid; gap: 14px; }
.exp li { display: grid; grid-template-columns: 42px 1fr; gap: 12px; }
.exp-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--navy); display: grid; place-items: center; }
.exp-ico img { width: 28px; height: 28px; }
.exp b { display: block; line-height: 1.25; }
.exp span { display: block; color: var(--muted); font-size: 13.5px; }
.exp p { margin-top: 3px; font-size: 15px; }
.skills { display: grid; gap: 8px; }
.skills li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.skills li:last-child { border-bottom: 0; }
.skills b { flex: 1; min-width: 0; }
.skills span { color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.endorse { appearance: none; cursor: pointer; border: 0; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px rgba(20, 33, 61, .25); }
.endorse.is-on { background: var(--teal); color: #fff; box-shadow: none; }
.seen-note { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.seen { display: flex; flex-wrap: wrap; gap: 7px; }
.seen li { background: #f6ecdb; border-radius: 999px; padding: 5px 12px; font-size: 13.5px; }

.keydlg { border: 0; padding: 0; border-radius: 24px; width: min(440px, calc(100vw - 28px)); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(20, 33, 61, .6); }
.keydlg::backdrop { background: rgba(20, 33, 61, .55); backdrop-filter: blur(2px); }
.keydlg form { display: grid; gap: 12px; padding: 24px; }
.keydlg h2 { font: 700 24px/1.15 var(--serif); color: var(--navy); }
.key-lede { color: #3b4664; font-size: 15px; }
.key-prov { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 600; font-size: 15px; }
.key-prov legend { padding: 0; margin-bottom: 6px; }
.key-prov label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.key-prov input { accent-color: var(--orange); width: 17px; height: 17px; }
.key-note { font-size: 13px; color: var(--muted); }
.key-get { font-size: 14px; }
.key-get a { color: var(--orange-2); font-weight: 700; }
.keydlg .err { margin-top: 0; }
.key-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.key-actions .btn-primary { flex: 1; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 20; max-width: calc(100vw - 32px); text-align: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 14px 16px 20px; display: grid; gap: 4px; }

/* ── narrow screens ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 10px; }
  .result { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .share { position: static; }
  .top-tag { display: none; }
}
@media (max-width: 520px) {
  main { padding: 0 14px 28px; }
  .top { padding: 10px 14px; }
  .brand-word { font-size: 22px; }
  .keychip span { display: none; }
  .keychip { padding: 9px; }
  .top { gap: 10px; }
  .notice { flex-wrap: wrap; }
  .hero h1 { margin: 12px 0 10px; }
  .lede { font-size: 16.5px; }
  .proof { margin-top: 12px; }
  .uploader { padding: 14px; border-radius: 22px; }
  .drop { padding: 18px 12px 16px; }
  .samples { margin-top: 16px; }
  .samples h2 { font-size: 15.5px; }
  .sample-grid { grid-template-columns: repeat(6, 92px); overflow-x: auto; margin: 0 -14px; padding: 4px 14px 12px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .sample-grid::-webkit-scrollbar { display: none; }
  .sample { scroll-snap-align: start; }
  .post-react { flex-wrap: wrap; }
  .p-cover { height: 104px; }
  .p-avatar { width: 108px; height: 108px; margin: -58px 0 0 16px; }
  .p-id { padding: 8px 16px 16px; }
  .p-id h1 { font-size: 26px; }
  .p-card { padding: 16px; }
  .share { padding: 12px; border-radius: 20px; }
  .share-head h2 { font-size: 16px; }
}
@media (hover: none) { #camBtn { display: inline-block; } }
@media (hover: hover) and (pointer: fine) { #camBtn { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
