:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #1f2a37;
  --muted: #6b7280;
  --line: #e7e3da;
  --brand: #0f5e4f;
  --brand-2: #157a67;
  --brand-soft: #e3f1ec;
  --gold: #ffc94d;
  --gold-soft: #fff4d6;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.boot { padding: 40px; text-align: center; color: var(--muted); }
.hidden { display: none !important; }

/* Top bar */
.topbar { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 10; }
.topbar-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 20px; padding: 0 16px; height: 60px; }
.brand { font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; white-space: nowrap; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--gold); color: var(--brand); font-size: 18px; }
.brand-lg { font-size: 1.3rem; color: var(--brand); margin-bottom: 20px; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a { color: #d6ebe5; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active { background: rgba(255,255,255,.15); color: #fff; }
.me-menu { display: flex; align-items: center; gap: 10px; }
.me-menu .btn-link { color: #d6ebe5; }

/* Layout */
.page { max-width: 1120px; margin: 0 auto; padding: 24px 16px 60px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card-tight { padding: 14px 16px; }
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .grid > aside { order: -1; }
  .me-name { display: none; }
}

/* Buttons & forms */
.btn { appearance: none; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; padding: 9px 16px; border-radius: 10px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.btn:hover { background: #faf9f6; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #3d2e00; }
.btn-danger { color: var(--danger); border-color: #f3c7c2; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 5px 10px; font-size: .85rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; font: inherit; color: inherit; padding: 9px 12px; border: 1px solid #d8d3c8; border-radius: 10px; background: #fff;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid #9fd6c8; outline-offset: 1px; border-color: var(--brand); }
textarea { resize: vertical; min-height: 90px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }

/* Auth */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 10%, #e3f1ec, var(--bg) 60%); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(15, 94, 79, .08); padding: 32px; }
.auth-card h1 { font-size: 1.4rem; }
.notice { border-radius: 10px; padding: 12px 14px; background: var(--brand-soft); color: #0b4a3e; font-size: .92rem; }
.notice-warn { background: var(--gold-soft); color: #5c4400; }
.notice-error { background: var(--danger-soft); color: var(--danger); }

/* Avatars */
.av { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .9rem; color: #fff; flex: none; text-decoration: none; }
.av-sm { width: 30px; height: 30px; font-size: .75rem; }
.av-lg { width: 72px; height: 72px; font-size: 1.5rem; }
.av-0 { background: #0f5e4f; } .av-1 { background: #c2410c; } .av-2 { background: #6d28d9; } .av-3 { background: #0369a1; }
.av-4 { background: #be185d; } .av-5 { background: #4d7c0f; } .av-6 { background: #a16207; } .av-7 { background: #334155; }
.av-sys { background: var(--gold); color: #3d2e00; }
.av-stack { display: flex; }
.av-stack .av { border: 2px solid #fff; margin-left: -8px; }
.av-stack .av:first-child { margin-left: 0; }

/* Composer */
.composer h2 { margin-bottom: 12px; }
.picker { position: relative; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: #0b4a3e; border-radius: 999px; padding: 3px 6px 3px 12px; font-weight: 600; font-size: .88rem; }
.chip button { border: 0; background: rgba(15,94,79,.12); color: inherit; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-size: 14px; line-height: 1; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.08); margin-top: 4px; max-height: 260px; overflow-y: auto; z-index: 5; }
.suggest button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px 12px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.suggest button:hover, .suggest button.on { background: var(--brand-soft); }
.amounts { display: flex; flex-wrap: wrap; gap: 6px; }
.amounts button { border: 1px solid #d8d3c8; background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.amounts button.on { background: var(--gold); border-color: var(--gold); color: #3d2e00; }
.amounts button:disabled { opacity: .4; cursor: not-allowed; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* Feed */
.post-head { display: flex; gap: 12px; align-items: flex-start; }
.post-who { flex: 1; min-width: 0; }
.post-who a { color: var(--ink); font-weight: 700; text-decoration: none; }
.post-who a:hover { text-decoration: underline; }
.post-msg { margin: 12px 0; white-space: pre-wrap; word-wrap: break-word; font-size: 1.02rem; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; background: var(--brand-soft); color: #0b4a3e; }
.badge-gold { background: var(--gold-soft); color: #6b4f00; }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-gray { background: #eef0f3; color: #475467; }
.post-actions { display: flex; gap: 16px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.post-actions button { background: none; border: 0; font: inherit; color: var(--muted); font-weight: 600; cursor: pointer; padding: 4px 0; }
.post-actions button.liked { color: #be185d; }
.post-actions .spacer { flex: 1; }
.comments { margin-top: 10px; }
.comment { display: flex; gap: 8px; margin-top: 8px; }
.comment-body { background: #f6f5f1; border-radius: 12px; padding: 6px 12px; flex: 1; min-width: 0; word-wrap: break-word; }
.comment-body strong { font-size: .88rem; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form input { flex: 1; }
.post-hidden { opacity: .6; border-style: dashed; }
.post-system { background: linear-gradient(135deg, #fffaf0, #fff); }

/* Sidebar */
.stat-big { font-size: 2rem; font-weight: 800; color: var(--brand); line-height: 1.1; }
.stats-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.meter { height: 8px; background: #eee9df; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.w-0{width:0}.w-10{width:10%}.w-20{width:20%}.w-30{width:30%}.w-40{width:40%}.w-50{width:50%}.w-60{width:60%}.w-70{width:70%}.w-80{width:80%}.w-90{width:90%}.w-100{width:100%}
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0ece4; }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.rank { width: 24px; font-weight: 800; color: var(--muted); text-align: center; }

/* People */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.person { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.person:hover { border-color: #b9d9cf; }
.person strong { display: block; }
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #efebe3; vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.inactive td { color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.kpi .v { font-size: 1.5rem; font-weight: 800; color: var(--brand); }
.kpi .l { font-size: .82rem; color: var(--muted); }

/* Dialog */
dialog { border: 0; border-radius: 16px; padding: 0; max-width: 560px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(17, 24, 39, .45); }
dialog form, .dialog-in { padding: 22px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #111827; color: #fff; padding: 10px 18px; border-radius: 10px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .2s; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* fixes */
a.av, .list a.av, .post-who a.av { color: #fff; text-decoration: none; }
@media (max-width: 700px) {
  .topbar-in { flex-wrap: wrap; height: auto; padding-top: 10px; gap: 6px 12px; }
  .brand { flex: 1; }
  .nav { order: 3; flex-basis: 100%; padding-bottom: 8px; }
  .nav a { padding: 6px 10px; }
}

/* Installed app (home screen): respect the notch / status bar */
.topbar { padding-top: env(safe-area-inset-top); }
.page { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }

/* Authenticator */
.steps { padding-left: 20px; margin: 0 0 12px; }
.steps li { margin-bottom: 6px; }
.qr { display: grid; place-items: center; margin: 8px 0 12px; }
.qr img { width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; word-break: break-all; }
.code-input { font-size: 1.4rem; letter-spacing: .3em; text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; }
details summary { cursor: pointer; color: var(--brand); font-weight: 600; margin-bottom: 6px; }
.backup-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: #f6f5f1; border-radius: 10px; padding: 14px; margin: 12px 0; font-size: 1.05rem; text-align: center; }
.badge { white-space: nowrap; }

/* Reactions */
.rx-wrap { position: relative; display: inline-flex; }
.post-actions .rx-main.on { color: var(--brand); }
.rx-bar { position: absolute; bottom: 100%; left: -6px; display: none; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px; box-shadow: 0 6px 20px rgba(0,0,0,.12); margin-bottom: 4px; z-index: 4; white-space: nowrap; }
.rx-bar::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; } /* hover bridge */
.rx-wrap:hover .rx-bar, .rx-wrap:focus-within .rx-bar { display: flex; }
.post-actions .rx-bar button { font-size: 1.45rem; line-height: 1; padding: 4px; border-radius: 50%; transition: transform .12s; color: inherit; }
.post-actions .rx-bar button:hover, .post-actions .rx-bar button:focus-visible { transform: scale(1.3) translateY(-2px); }
.post-actions .rx-bar button.on { background: var(--brand-soft); }
.rx-summary { font-size: .95rem; color: var(--muted); cursor: default; letter-spacing: -.05em; }
.rx-summary span { letter-spacing: 0; margin-left: 2px; font-weight: 600; }
@media (hover: none) { .rx-bar { position: static; display: flex; box-shadow: none; border: 0; padding: 0; margin: 0; background: none; } .rx-main { display: none; } .post-actions { flex-wrap: wrap; } }

/* Emoji picker */
.with-emoji { position: relative; }
.with-emoji textarea { padding-right: 44px; }
.with-emoji .emoji-btn { position: absolute; right: 8px; bottom: 10px; }
.emoji-btn { border: 0; background: none; font-size: 1.25rem; cursor: pointer; padding: 4px; border-radius: 8px; line-height: 1; }
.emoji-btn:hover { background: #f1efe9; }
.emoji-pop { position: absolute; left: var(--x); top: var(--y); width: min(300px, calc(100vw - 16px)); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; z-index: 60; }
.emoji-pop button { border: 0; background: none; font-size: 1.35rem; padding: 4px 0; border-radius: 8px; cursor: pointer; }
.emoji-pop button:hover { background: var(--brand-soft); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; }

/* Composer modes, posts & announcements */
.mode-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.mode-tabs button { border: 1px solid var(--line); background: #faf9f6; border-radius: 999px; padding: 7px 14px; font: inherit; font-weight: 700; cursor: pointer; color: var(--muted); }
.mode-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.announce-only .check { margin-bottom: 6px; }
.post-announce { border: 2px solid var(--gold); background: linear-gradient(180deg, #fffaeb, #fff 60%); }
.announce-tag { font-weight: 800; color: #6b4f00; }

/* Quick replies */
.quick-replies { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.quick-replies button { border: 1px solid #d8d3c8; background: #fff; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .85rem; cursor: pointer; color: var(--ink); }
.quick-replies button:hover { background: var(--brand-soft); border-color: #b9d9cf; }
.quick-replies button:disabled { opacity: .5; }

/* Badges & team shout-outs */
.badge-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-pick button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d8d3c8; background: #fff; border-radius: 999px; padding: 5px 12px 5px 8px; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.badge-pick button span { font-size: 1.15rem; }
.badge-pick button.on { background: var(--gold-soft); border-color: var(--gold); color: #5c4400; }
.chip-group { background: var(--gold-soft); color: #5c4400; }
.av-more { background: #e7e3da; color: var(--ink); font-size: .7rem; }
.award { display: inline-flex; align-items: center; gap: 10px; background: linear-gradient(135deg, var(--gold-soft), #fff); border: 1px solid #f3dc9a; border-radius: 12px; padding: 8px 14px 8px 10px; margin-top: 12px; }
.award-emoji { font-size: 1.8rem; line-height: 1; }
.badge-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.badge-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: #faf9f6; border-radius: 12px; padding: 10px 6px; }

/* Photos, links, editing */
.post-msg a { word-break: break-all; }
.photo-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.thumb { position: relative; display: inline-block; }
.thumb img { height: 72px; max-width: 140px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.thumb-x { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: #111827; color: #fff; cursor: pointer; line-height: 1; }
.post-photo { display: block; margin: 4px 0 12px; }
.post-photo img { max-width: 100%; max-height: 480px; border-radius: 12px; border: 1px solid var(--line); display: block; }
.edit-box { margin: 10px 0; }
.edit-box textarea { min-height: 80px; margin-bottom: 8px; }
.comment-body { position: relative; }
.c-del { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; opacity: 0; }
.comment:hover .c-del, .c-del:focus { opacity: 1; }
@media (hover: none) { .c-del { opacity: .6; } }

/* Link preview card */
.link-card { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; margin: 4px 0 12px; background: #fff; max-width: 560px; }
.link-card:hover { border-color: #b9d9cf; }
.link-card img { display: block; width: 100%; max-height: 300px; object-fit: cover; background: #f1efe9; border-bottom: 1px solid var(--line); }
.link-card-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; }
.link-card-body strong { line-height: 1.3; }
.link-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Link preview in the post box */
#draft-preview { margin-top: 8px; }
.draft-card { position: relative; max-width: 560px; }
.draft-card .link-card { margin: 0; pointer-events: none; }
.draft-card .link-card img { max-height: 200px; }
.draft-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(17,24,39,.75); color: #fff; font-size: 1.1rem; cursor: pointer; line-height: 1; }
.draft-loading { padding: 8px 0; }

/* Multiple photos in the post box */
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.thumbs:empty { display: none; }
.thumb-x { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: #111827; color: #fff; cursor: pointer; line-height: 1; }
.thumb-edit { position: absolute; bottom: 4px; right: 4px; border: 0; background: rgba(255,255,255,.92); border-radius: 8px; cursor: pointer; padding: 2px 6px; font-size: .85rem; }
.thumb-gif { position: absolute; bottom: 4px; left: 4px; background: rgba(17,24,39,.8); color: #fff; font-size: .7rem; font-weight: 800; border-radius: 6px; padding: 1px 5px; }
.thumb img { height: 84px; width: 84px; object-fit: cover; }

/* Collage in the feed */
.collage { display: grid; gap: 4px; border-radius: 12px; overflow: hidden; max-width: 560px; }
.collage a { display: block; background: #f1efe9; }
.collage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.collage-1 { grid-template-columns: 1fr; }
.collage-1 img { height: auto; max-height: 480px; object-fit: contain; background: #f6f5f1; }
.collage-2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 260px; }
.collage-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 160px 160px; }
.collage-3 a:first-child { grid-row: span 2; }
.collage-4 { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
.collage-5 { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 170px; }
.collage-5 a:nth-child(-n+2) { grid-column: span 3; }
.collage-5 a:nth-child(n+3) { grid-column: span 2; grid-row: auto; }
.collage-6 { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 150px; }
.post-photo img { border: 0; border-radius: 0; max-width: none; }
@media (max-width: 600px) { .collage-2 { grid-auto-rows: 170px; } .collage-3 { grid-template-rows: 110px 110px; } .collage-4 { grid-auto-rows: 130px; } .collage-5 { grid-auto-rows: 110px; } .collage-6 { grid-auto-rows: 100px; } }

/* Photo editor */
dialog.editor { max-width: 760px; }
.ed-stage { background: #1f2937; border-radius: 12px; display: grid; place-items: center; padding: 10px; margin: 10px 0; }
.ed-canvas { max-width: 100%; max-height: 52vh; display: block; }
.ed-tools { display: flex; flex-direction: column; gap: 8px; }
.ed-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ed-group > .small { width: 56px; }
.ed-group .btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ed-text input { flex: 1; min-width: 160px; }
.ed-text select { width: auto; }

/* GIF picker */
dialog.gif-dialog { max-width: 640px; }
.gif-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; max-height: 55vh; overflow-y: auto; margin-top: 10px; }
.gif-grid button { border: 0; padding: 0; background: #f1efe9; border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 1; }
.gif-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gif-grid.busy { opacity: .5; pointer-events: none; }
.gif-grid .empty { grid-column: 1 / -1; }
.giphy-attr { font-size: .75rem; color: var(--muted); text-align: right; margin-top: 8px; font-weight: 700; letter-spacing: .02em; }

/* Work style */
.ws-head { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.ws-head h2 { margin: 0; font-size: 1.4rem; }
.ws-emoji { font-size: 2.2rem; line-height: 1; }
.ws-card { border-top: 5px solid var(--brand); }
.ws-trailblazer { border-top-color: #c2410c; } .ws-spark { border-top-color: #be185d; } .ws-architect { border-top-color: #0369a1; } .ws-anchor { border-top-color: #4d7c0f; }
.ws-strengths { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.ws-appreciate { background: var(--gold-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: .95rem; }
.ws-bars { display: grid; gap: 6px; margin-bottom: 12px; }
.ws-bar { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 10px; }
.ws-bar .meter { margin: 0; }
.ws-hint:not(:empty) { margin-top: 8px; background: var(--brand-soft); color: #0b4a3e; border-radius: 10px; padding: 8px 12px; }
.quiz { max-width: 640px; margin: 0 auto; }
.quiz h1 { margin: 18px 0; font-size: 1.45rem; }
.quiz-meter { margin-top: 10px; }
.quiz-meter i { background: var(--brand); }
.quiz-opts { display: grid; gap: 10px; margin-bottom: 14px; }
.quiz-opt { text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 14px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.quiz-opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.quiz-opt.on { border-color: var(--brand); }
.quiz-result { max-width: 640px; margin: 0 auto; }
.quiz-result > * + * { margin-top: 14px; }
.team-mix { margin-bottom: 16px; }
.mix-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; }
.mix-item { display: flex; flex-direction: column; align-items: center; background: #faf9f6; border-radius: 12px; padding: 10px 4px; }
.mix-item strong { font-size: 1.3rem; }

/* 16-type personality */
.pers-card { border-top: 5px solid #6d28d9; }
.pers-code { background: #ede9fe; color: #5b21b6; border-radius: 8px; padding: 1px 8px; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .05em; margin-right: 4px; }
.pers-dims { display: grid; gap: 8px; margin: 10px 0 12px; }
.pers-dim { display: grid; grid-template-columns: 1fr 1.4fr 1fr; align-items: center; gap: 10px; }
.pers-dim span:last-child { text-align: right; }
.pers-meter { margin: 0; background: #ede9fe; }
.pers-meter i { background: #6d28d9; }
.strong { font-weight: 700; }
.pers-note { margin: 10px 0 0; }
.quiz-two { grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .quiz-two { grid-template-columns: 1fr; } .pers-dim { grid-template-columns: 1fr 1fr; } .pers-dim .pers-meter { grid-column: 1 / -1; order: 3; } }
.pers-tag { display: inline-block; margin-top: 3px; background: #ede9fe; color: #5b21b6; border-radius: 6px; padding: 0 6px; font-size: .75rem; font-weight: 800; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* Fun quizzes */
.quiz-hub .list li a { color: var(--brand); }
.fun-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fun-grid:has(> .fun-card:only-child) { grid-template-columns: 1fr; }
@media (max-width: 600px) { .fun-grid { grid-template-columns: 1fr; } }
.fun-card { background: #faf9f6; border-radius: 12px; padding: 12px 14px; }
.fun-title { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 1.1rem; }
.fun-title .ws-emoji { font-size: 1.6rem; }
.fun-card p { margin: 4px 0; }
.fun-tip { color: #0b4a3e; }
