/* Flash Sale — peer-to-peer item board */

:root {
  --fs-ink: #0f172a;
  --fs-muted: #64748b;
  --fs-line: #e2e8f0;
  --fs-soft: #f1f5f9;
  --fs-card: #ffffff;
  --fs-accent: #0f766e;
  --fs-accent-deep: #115e59;
  --fs-accent-soft: #ccfbf1;
  --fs-warn: #b45309;
  --fs-danger: #991b1b;
  --fs-ok: #065f46;
  --fs-radius: 14px;
  --fs-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
}

.tb-page-wrap,
.fs-page {
  max-width: 920px;
  margin: 0 auto;
  padding-top: 20px;
  padding-bottom: max(72px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  color: var(--fs-ink);
}

.fs-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 20px;
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--fs-line);
}

.fs-hero__eyebrow {
  display: inline-block;
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fs-accent);
}

.fs-hero h1,
.fs-hero h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.fs-hero__lead {
  margin: 8px 0 0;
  max-width: 34rem;
  color: var(--fs-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.fs-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--fs-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
  transition: background 0.15s ease, transform 0.15s ease;
}

.fs-cta:hover {
  background: var(--fs-accent-deep);
  color: #fff;
}

.fs-cta:active {
  transform: translateY(1px);
}

.fs-cta--ghost {
  background: var(--fs-soft);
  color: #334155;
  box-shadow: none;
}

.fs-cta--ghost:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.fs-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (min-width: 720px) {
  .fs-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

.fs-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--fs-card);
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-radius);
  overflow: hidden;
  box-shadow: var(--fs-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fs-card:hover {
  border-color: #99f6e4;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.08), 0 12px 28px rgba(15, 23, 42, 0.08);
}

.fs-card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.fs-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(145deg, #ecfeff 0%, #f8fafc 55%, #f1f5f9 100%);
  overflow: hidden;
}

.fs-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fs-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fs-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 12px 14px;
  flex: 1;
}

.fs-card__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fs-card__meta {
  margin: 0;
  color: var(--fs-muted);
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fs-card__price {
  margin: 2px 0 0;
  color: var(--fs-accent-deep);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.fs-empty {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--fs-radius);
  background: #f8fafc;
  color: var(--fs-muted);
}

.fs-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--fs-ink);
  font-size: 1.05rem;
}

.board-pager,
.fs-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 22px 0 0;
}

.board-pager a,
.board-pager .cur,
.fs-pager a,
.fs-pager .cur {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--fs-line);
  background: #fff;
  color: #334155;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.board-pager .cur,
.fs-pager .cur {
  background: var(--fs-accent);
  border-color: var(--fs-accent);
  color: #fff;
}

.crumb a,
.fs-crumb a {
  color: var(--fs-accent-deep);
  text-decoration: none;
  font-weight: 600;
}

.crumb a:hover,
.fs-crumb a:hover {
  text-decoration: underline;
}

.fs-crumb {
  margin: 0 0 10px;
  font-size: 0.92rem;
}

.tb-write-form,
.fs-form {
  display: grid;
  gap: 4px;
}

.tb-write-form label,
.fs-form label {
  display: block;
  font-weight: 650;
  margin: 14px 0 6px;
  font-size: 0.92rem;
}

.tb-write-form input[type="text"],
.tb-write-form input[type="email"],
.tb-write-form input[type="tel"],
.tb-write-form input[type="number"],
.tb-write-form textarea,
.fs-form input[type="text"],
.fs-form input[type="email"],
.fs-form input[type="tel"],
.fs-form input[type="number"],
.fs-form textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: var(--fs-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tb-write-form input:focus,
.tb-write-form textarea:focus,
.fs-form input:focus,
.fs-form textarea:focus {
  outline: none;
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.22);
}

.tb-write-form textarea,
.fs-form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}

.tb-write-actions,
.fs-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tb-btn,
.fs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

.tb-btn--primary,
.fs-btn--primary {
  background: var(--fs-accent);
  color: #fff;
}

.tb-btn--ghost,
.fs-btn--ghost {
  background: var(--fs-soft);
  color: #334155;
}

.tb-notice,
.fs-notice {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  margin-bottom: 16px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.tb-notice--ok,
.fs-notice--ok {
  background: #ecfdf5;
  color: var(--fs-ok);
}

.tb-notice--err,
.fs-notice--err {
  background: #fef2f2;
  color: var(--fs-danger);
}

.tb-sub,
.fs-sub {
  color: var(--fs-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 16px;
}

.tb-fieldset,
.fs-fieldset {
  border: 1px solid var(--fs-line);
  border-radius: var(--fs-radius);
  padding: 14px 16px 18px;
  margin: 8px 0 4px;
  background: #fafbfc;
}

.tb-fieldset legend,
.fs-fieldset legend {
  font-weight: 750;
  padding: 0 6px;
  color: var(--fs-ink);
}

.tb-req,
.fs-req {
  color: var(--fs-warn);
}

.fs-photo {
  margin-top: 8px;
  border: 1.5px dashed #94a3b8;
  border-radius: var(--fs-radius);
  background:
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 18px 16px;
  text-align: center;
}

.fs-photo__title {
  margin: 0 0 4px;
  font-weight: 750;
  font-size: 0.98rem;
}

.fs-photo__hint {
  margin: 0 0 12px;
  color: var(--fs-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.fs-photo input[type="file"] {
  width: min(100%, 280px);
  margin: 0 auto;
  font: inherit;
}

.fs-hint {
  margin: 6px 0 0;
  color: var(--fs-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.fs-view {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 56px;
}

.fs-view__media {
  margin: 0 0 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--fs-line);
  background: #f8fafc;
  box-shadow: var(--fs-shadow);
}

.fs-view__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  background: #0f172a08;
}

.fs-view h1 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.fs-view__price {
  margin: 0 0 10px;
  color: var(--fs-accent-deep);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.fs-view__byline {
  margin: 0 0 18px;
  color: var(--fs-muted);
  font-size: 0.92rem;
}

.fs-view article {
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.65;
  font-size: 1rem;
  color: #1e293b;
}

.fs-view article img,
.fs-view article video {
  max-width: 100%;
  height: auto;
}

.fs-contact {
  margin: 22px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--fs-accent-soft);
  border: 1px solid #99f6e4;
  color: #134e4a;
  font-size: 0.92rem;
  line-height: 1.5;
}

.fs-contact strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Legacy board-head hooks (unused on new layout, kept harmless) */
.board-wrap { margin: 0; }
.board-head { display: none; }
