/* Open Free Agency - visual polish for the member desk and the public page (2026-11-18).
   Loaded only by desk.php (body.room) and public.php (body.shopfront). CSS only. */

/* ---------- shared: desk + public ---------- */
body.room, body.shopfront { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body.room .wrap, body.shopfront .wrap { padding-left: 16px; padding-right: 16px; overflow-x: clip; }
body.room .nav, body.shopfront .nav { margin-left: -16px; margin-right: -16px; padding: 10px 16px; min-height: 56px; }
body.room .brand, body.shopfront .brand { gap: 10px; min-width: 0; }
body.room .brand-mark, body.shopfront .brand-mark { flex: none; }
body.room .card, body.shopfront .card { border-color: #ececec; border-radius: 16px; padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.03); min-width: 0; }
body.room .card h2, body.shopfront .card h2 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.02em; color: #262626; }
body.room .card h3, body.shopfront .card h3 { font-size: 1.05rem; line-height: 1.3; color: #262626; }
body.room .card p, body.shopfront .card p { line-height: 1.5; }
body.room .small, body.shopfront .small { line-height: 1.45; }
body.room .btn, body.shopfront .btn { min-height: 44px; padding: 10px 16px; font-weight: 600; line-height: 1.2; transition: background-color .15s, border-color .15s, color .15s; }
body.room .btn:not(.primary):not(.ghost), body.shopfront .btn:not(.primary):not(.ghost) { background: #fff; border-color: #dbdbdb; color: #262626; }
body.room .btn:not(.primary):not(.ghost):hover, body.shopfront .btn:not(.primary):not(.ghost):hover { background: #f5f5f5; }
body.room .btn.primary, body.shopfront .btn.primary { min-height: 46px; }
body.room .row, body.shopfront .row { gap: 8px; }
body.room label, body.shopfront label { color: #555; font-size: .84rem; margin: 14px 0 6px; }
body.room input, body.room textarea, body.room select,
body.shopfront input, body.shopfront textarea, body.shopfront select { width: 100%; max-width: 100%; border-radius: 10px; padding: 11px 13px; line-height: 1.4; }
body.room input, body.room select, body.shopfront input, body.shopfront select { min-height: 46px; }
body.room textarea, body.shopfront textarea { min-height: 96px; resize: vertical; }
body.room input:focus, body.room textarea:focus, body.room select:focus,
body.shopfront input:focus, body.shopfront textarea:focus, body.shopfront select:focus { border-color: #0095f6; box-shadow: 0 0 0 3px rgba(0,149,246,.12); }
body.room input[type="checkbox"], body.room input[type="radio"],
body.shopfront input[type="checkbox"], body.shopfront input[type="radio"] { width: auto; min-height: 0; padding: 0; box-shadow: none; }
body.room .badge, body.shopfront .badge { border-radius: 999px; font-weight: 600; }
body.room .footer, body.shopfront .footer { margin-top: 32px; text-align: center; color: #8e8e8e; }

/* ---------- desk (desk.php) ---------- */
@media (min-width: 900px) { body.room .wrap { max-width: 760px; } }
body.room .desk-hero { padding: 4px 2px 6px; margin-bottom: 14px; }
body.room .desk-hero h1 { font-size: clamp(1.6rem, 5.5vw, 2.1rem); line-height: 1.15; letter-spacing: -0.03em; margin: 2px 0 6px; overflow-wrap: anywhere; }
body.room .desk-hero .lead { font-size: 1rem; line-height: 1.45; color: #737373; overflow-wrap: anywhere; }
body.room .gate-card { padding: 24px 20px; }

/* tab bar: one row that scrolls sideways on a phone; a segmented bar on a laptop */
body.room .tabs {
  flex-wrap: nowrap; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-snap-type: x proximity;
  margin: 0 -16px 16px; padding: 2px 16px 8px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
body.room .tabs::-webkit-scrollbar { display: none; }
body.room .tab { flex: none; scroll-snap-align: start; white-space: nowrap; min-height: 38px; padding: 8px 15px; font-size: .92rem; font-weight: 600; border: 1px solid #dbdbdb; color: #555; background: #fff; }
body.room .tab:hover { color: #262626; border-color: #bdbdbd; }
body.room .tab.on { background: #262626; color: #fff; border-color: #262626; }
@media (min-width: 760px) {
  body.room .tabs { margin: 0 0 18px; padding: 4px; gap: 2px; background: #fff; border: 1px solid #ececec; border-radius: 14px; -webkit-mask-image: none; mask-image: none; overflow: visible; }
  body.room .tab { flex: 1 1 0; min-width: 0; border-color: transparent; border-radius: 10px; padding: 8px 6px; text-align: center; }
  body.room .tab:hover { background: #f5f5f5; border-color: transparent; }
  body.room .tab.on, body.room .tab.on:hover { background: #262626; border-color: #262626; }
}

/* lists, rows and empty states */
body.room .list { gap: 8px; }
body.room .item { border-radius: 12px; border-color: #ececec; padding: 14px 16px; background: #fff; overflow-wrap: anywhere; min-width: 0; }
body.room .item:hover { border-color: #c7c7c7; }
body.room .list:empty { display: none; }
body.room .list > p.muted:only-child, body.room .list > p.small:only-child {
  margin: 0; padding: 18px 16px; text-align: center; border: 1px dashed #dbdbdb; border-radius: 12px; background: #fcfcfc;
}

/* live board */
body.room .live-board { gap: 12px; }
body.room .live-instrument { border-color: #ececec; border-radius: 16px; padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
body.room .live-instrument .row .btn { flex: 1 1 auto; }
@media (min-width: 760px) {
  body.room .live-board { grid-template-columns: 1fr 1fr; }
  body.room .live-board > .live-instrument:first-child { grid-column: 1 / -1; }
}
body.room #btn-workshop { display: flex; margin: 16px auto 4px; }
body.room .sig-wrap { overflow: hidden; }
body.room .sig-wrap canvas { display: block; max-width: 100%; }

/* assistant: chat thread */
body.room #chat-thread { display: flex; flex-direction: column; gap: 8px; max-height: min(60vh, 520px); overflow-y: auto; }
body.room #chat-thread:empty { display: none; }
body.room #chat-thread > * + * { margin-top: 0; }
body.room #chat-thread > .item.static { max-width: 88%; align-self: flex-start; padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: #f2f2f2; border-color: transparent; }
body.room #chat-thread > .item.static p { overflow-wrap: anywhere; white-space: pre-wrap; }
body.room #chat-thread > .item.static:nth-child(odd) { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: #e8f4fe; }
body.room #chat-thread > .card { border-radius: 14px; }
body.room #tab-assistant .row { flex-wrap: nowrap; align-items: stretch; }
body.room #tab-assistant .row #chat-input { min-width: 0 !important; }
body.room #tab-assistant .row .btn { flex: none; }

/* phone */
@media (max-width: 599px) {
  body.room .nav { flex-wrap: wrap; row-gap: 4px; padding: 8px 16px 6px; }
  body.room .nav-links { margin-left: auto; max-width: 100%; flex-wrap: nowrap; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  body.room .nav-links::-webkit-scrollbar { display: none; }
  body.room .nav-links .btn { flex: none; white-space: nowrap; min-height: 36px; }
  body.room .card, body.room .live-instrument { padding: 18px 16px; border-radius: 14px; }
  body.room .card .row > .btn.btn-lg, body.room .card .row > .btn.primary { flex: 1 1 100%; }
}

/* ---------- public page (public.php) ---------- */
@media (min-width: 900px) { body.shopfront .wrap { max-width: 760px; } }
body.shopfront .hero.face {
  background: #fff; border: 1px solid #ececec; border-radius: 20px; padding: 26px 22px 22px;
  margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.03); overflow-wrap: anywhere;
}
body.shopfront .hero.face .pill { display: inline-block; margin: 0 0 10px; padding: 3px 10px; border-radius: 999px; background: #f5f5f5; border: 0; color: #737373; font-size: .8rem; font-weight: 600; max-width: 100%; overflow-wrap: anywhere; }
body.shopfront .hero.face h1 { font-size: clamp(1.75rem, 6vw, 2.35rem); line-height: 1.1; letter-spacing: -0.035em; margin: 0 0 8px; color: #262626; }
body.shopfront .hero.face .lead { color: #555; font-size: 1.02rem; line-height: 1.5; max-width: 40rem; }
body.shopfront .hero.face .lead + .lead { margin-top: 10px; color: #737373; }
body.shopfront .face-contact { font-size: .98rem; }
body.shopfront .face-price { padding-top: 14px; border-top: 1px solid #f0f0f0; }
body.shopfront .face-jumps { gap: 8px; margin: 0 0 20px; }
body.shopfront .face-jumps .btn { min-height: 38px; padding: 8px 16px; border-radius: 999px; font-size: .92rem; }
body.shopfront .face-jumps .btn.ghost { border: 1px solid #dbdbdb; background: #fff; }
body.shopfront .face-block { margin-bottom: 26px; }
body.shopfront .face-kicker { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 4px; }
body.shopfront .face-note { margin: 0 0 12px; }
body.shopfront .shop-grid { gap: 12px; align-items: start; }
@media (min-width: 640px) { body.shopfront .shop-grid { grid-template-columns: 1fr 1fr; } }
body.shopfront .shop-grid > .card { display: flex; flex-direction: column; height: 100%; }
body.shopfront .shop-grid > .card > * + * { margin-top: 10px; }
body.shopfront .product-img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: 12px; border-color: #f0f0f0; }
body.shopfront .offer-title { font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
body.shopfront .shop-grid .price { font-size: 1.5rem; letter-spacing: -0.03em; color: #262626; margin: 0; font-variant-numeric: tabular-nums; }
body.shopfront .shop-grid .card > .row { margin-top: auto !important; padding-top: 6px; }
body.shopfront .shop-grid .card > .row .btn.primary { width: 100%; }
body.shopfront .checkout-sheet { border-top: 1px solid #f0f0f0; padding-top: 12px; }
body.shopfront .sheet { overflow-wrap: anywhere; }
body.shopfront .page-excerpt { margin: 0; line-height: 1.55; font-size: .98rem; }
body.shopfront article.card > h3 { font-size: 1.1rem; }
body.shopfront .page-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; color: #262626; overflow-wrap: anywhere; }
body.shopfront .page-link + .page-link, body.shopfront .page-link + article, body.shopfront article + .page-link { margin-top: 10px; }
@media (max-width: 599px) {
  body.shopfront .hero.face { padding: 22px 18px 18px; border-radius: 16px; }
  body.shopfront .card { padding: 18px 16px; }
}
