/* public/assets/css/style.css — DOPP shared styles */

:root {
  --paper: #f5f0e6;
  --card: #fffdf7;
  --ink: #201d18;
  --ink-soft: #4a453c;
  --muted: #7d766a;
  --line: #e3dbc9;
  --line-soft: #efe8d8;
  --accent: #c9481d;
  --accent-dark: #9a3512;
  --serif: 'Shippori Mincho B1', 'Hiragino Mincho ProN', serif;
  --sans: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
button { font-family: inherit; }

/* Layout */
.app { max-width: 430px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; padding: 0 20px 96px 20px; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 0 20px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.brand-mark { font-size: 14px; font-weight: 700; letter-spacing: 0.22em; }
.topbar-note { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }

/* Headings */
.section-head { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--ink); padding-bottom: 6px; margin: 28px 0 12px 0; }
.section-title { font-family: var(--serif); font-size: 16px; font-weight: 700; }
.section-sub { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; }

.eyebrow { font-size: 11px; color: var(--accent); font-weight: 700; letter-spacing: 0.18em; }
.h-serif { font-family: var(--serif); font-size: 24px; font-weight: 700; line-height: 1.45; margin: 8px 0; }
.lead { font-size: 13px; color: var(--ink-soft); }
.note { font-size: 11px; color: var(--muted); }

/* Profile */
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 22px; text-align: center; }
.disc { width: 80px; height: 80px; }
.disc.spin { animation: spin 4s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .disc.spin { animation: none; } }
.handle { font-size: 21px; font-weight: 700; letter-spacing: 0.02em; }
.attrs { font-size: 13px; color: var(--ink-soft); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.chip { font-size: 11px; padding: 5px 10px; border: 1px solid var(--ink); border-radius: 2px; letter-spacing: 0.04em; background: transparent; color: var(--ink); cursor: pointer; }
.chip.on { background: var(--ink); color: var(--paper); }
.stats { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.stats b { color: var(--ink); }

/* Buttons */
.btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; border: 0; border-radius: 3px; font-size: 14px; font-weight: 700; letter-spacing: 0.12em; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fffdf7; }
.btn-primary:disabled { opacity: 0.5; cursor: default; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-text { background: none; border: 0; color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; cursor: pointer; padding: 12px 0; }
.btn-text.inline { padding: 0; font-size: inherit; letter-spacing: 0; vertical-align: baseline; }
.btn-sm { height: 36px; font-size: 12px; padding: 0 14px; width: auto; }

/* Tabs (picker sheet) */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab-btn { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 0; font-size: 13px; color: var(--muted); cursor: pointer; }
.tab-btn.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }

/* Card (one pick) */
.card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 12px; margin-bottom: 12px; }
.card.empty { border-style: dashed; color: var(--muted); }
.card.pick { flex-direction: column; align-items: stretch; gap: 8px; }
.card-top { display: flex; align-items: center; gap: 12px; }
.card.mini { padding: 8px; margin: 6px 0; }
.card.mini .art { width: 44px; height: 44px; }
.card.mini .track-title { font-size: 13px; }
.tagline { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 10px; color: var(--accent); font-weight: 700; letter-spacing: 0.06em; border: 1px solid var(--accent); border-radius: 2px; padding: 1px 6px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.act { display: inline-flex; align-items: center; gap: 4px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 11px; color: var(--ink-soft); cursor: pointer; line-height: 1.2; }
.act:hover { border-color: var(--ink); }
.act.on { color: var(--accent); border-color: var(--accent); }
.act:disabled { opacity: 0.5; }
.plays { margin-left: auto; }
.filter-row { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-row .chip { flex-shrink: 0; }
.comment { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.comment-head { display: flex; align-items: baseline; gap: 8px; font-size: 12px; }
.comment-head .btn-text { margin-left: auto; }
.comment-body { font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.tagpick { display: flex; flex-wrap: wrap; gap: 6px; }
.art { width: 64px; height: 64px; border-radius: 2px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #5b6b8c; overflow: hidden; }
.art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.prompt-label { font-size: 10px; color: var(--accent); font-weight: 700; letter-spacing: 0.1em; }
.track-title { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.track-artist { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.track-comment { font-size: 12px; color: var(--ink-soft); }
.play { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); border: 0; flex-shrink: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.play svg { display: block; }
.play.playing { background: var(--accent); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; }
.field .hint { font-size: 11px; color: var(--muted); }
.input { width: 100%; height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--card); font-size: 16px; font-family: inherit; color: var(--ink); }
.input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
textarea.input { height: auto; padding: 12px; line-height: 1.5; }
select.input { -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* Messages */
.msg { font-size: 13px; padding: 12px; border-radius: 3px; margin: 12px 0; }
.msg-error { background: #fbe9e3; color: var(--accent-dark); }
.msg-ok { background: #e8efe6; color: #2e4a33; }

/* Invite codes */
.invite { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; margin-bottom: 8px; }
.invite code { font-size: 15px; font-weight: 700; letter-spacing: 0.16em; }
.invite.used { opacity: 0.5; }

/* People list */
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.person .disc { width: 44px; height: 44px; }
.person-name { font-size: 14px; font-weight: 700; }
.person-attrs { font-size: 12px; color: var(--muted); }

/* Bottom tabs */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; display: flex; border-top: 1px solid var(--ink); background: var(--paper); padding-bottom: env(safe-area-inset-bottom); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 0 14px 0; color: var(--muted); font-size: 10px; }
.tab.on { color: var(--accent); font-weight: 700; }
.tab svg { display: block; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: var(--paper); font-size: 13px; padding: 10px 16px; border-radius: 3px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; }
.toast.show { opacity: 1; }

/* Sheets */
.sheet-bg { position: fixed; inset: 0; background: rgba(32,29,24,0.45); display: none; align-items: flex-end; justify-content: center; z-index: 40; }
.sheet-bg.open { display: flex; }
.sheet { position: relative; width: 100%; max-width: 430px; background: var(--paper); border-radius: 12px 12px 0 0; padding: 20px 20px 32px 20px; max-height: 88vh; overflow: auto; -webkit-overflow-scrolling: touch; }
.sheet-title { font-family: var(--serif); font-size: 16px; font-weight: 700; margin-bottom: 12px; padding-right: 28px; }
.sheet-title .note { font-family: var(--sans); font-weight: 400; margin-top: 2px; }
.sheet-close { position: absolute; right: 24px; background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0; }
#dopp-picker { z-index: 50; }

.center { text-align: center; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.hidden { display: none !important; }
