/* =========================================================
   BizCross — Mobile Web App
   ========================================================= */
:root {
  --blue: #1e88e5;
  --blue-dark: #1565c0;
  --blue-soft: #e3f2fd;
  --blue-mid: #90caf9;
  --ink: #2c3e50;
  --ink-soft: #5a6a7a;
  --muted: #8a96a3;
  --line: #e8eef4;
  --bg: #f3f6fa;
  --white: #ffffff;
  --danger: #ef5350;
  --keep: #78909c;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 8px 28px rgba(44, 62, 80, 0.1);
  --shadow-sm: 0 2px 10px rgba(44, 62, 80, 0.06);
  --nav-h: 64px;
  --header-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* App shell — mobile first */
.app-shell {
  height: 100%;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
}

.app {
  width: 100%;
  max-width: 480px;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header — fixed to top of app shell */
.app-header {
  height: var(--header-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-header .icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--ink);
  border-radius: 50%;
}

.app-header .icon-btn:active { background: var(--blue-soft); }

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-text .biz { color: var(--blue); }
.brand-text .cross { color: var(--ink); }

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.header-avatar-link {
  display: block;
  flex-shrink: 0;
  border-radius: 50%;
  line-height: 0;
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--line);
  background: var(--blue-soft);
}

.header-avatar-link:active .header-avatar {
  opacity: 0.85;
}

.notif { position: relative; }
.notif .badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--white);
}

/* Tabs */
.tabs {
  flex-shrink: 0;
  display: flex;
  gap: 4px;
  padding: 0 12px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex-shrink: 0;
  padding: 12px 14px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* Main scroll */
.main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 14px calc(var(--nav-h) + 16px + var(--safe-b));
  -webkit-overflow-scrolling: touch;
}

.main.no-pad-x { padding-left: 0; padding-right: 0; }
.main.swipe-main {
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-h) + 8px + var(--safe-b));
  overflow: hidden;
}

/* Match card */
.card-stack {
  flex: 1;
  position: relative;
  min-height: 0;
  display: flex;
  align-items: stretch;
}

.match-card {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, opacity 0.25s ease;
  will-change: transform;
}

.match-card.dragging { transition: none; }
.match-card.fly-left { transform: translateX(-120%) rotate(-12deg); opacity: 0; }
.match-card.fly-right { transform: translateX(120%) rotate(12deg); opacity: 0; }
.match-card.fly-up { transform: translateY(-120%); opacity: 0; }

.card-photo {
  position: relative;
  height: 200px;
  flex-shrink: 0;
  background: linear-gradient(145deg, #90caf9, #1565c0 60%, #0d47a1);
  overflow: hidden;
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-photo .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 40, 70, 0.55) 0%, transparent 45%);
  pointer-events: none;
}

.match-ring {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  display: grid;
  place-items: center;
}

.match-ring svg { position: absolute; inset: 0; }
.match-ring .pct {
  position: relative;
  z-index: 1;
  text-align: center;
  line-height: 1.1;
}
.match-ring .pct strong {
  display: block;
  font-size: 14px;
  color: var(--blue);
  font-weight: 800;
}
.match-ring .pct span {
  font-size: 8px;
  color: var(--muted);
  font-weight: 600;
}

.card-catch {
  position: absolute;
  left: 14px;
  right: 70px;
  bottom: 12px;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.card-body {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.company-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.person-row .role { font-weight: 600; color: var(--ink); }

.meta-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.meta-row svg { flex-shrink: 0; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 700;
}

.desc {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.need-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: #eef5fc;
  border-radius: var(--radius-sm);
  border: 1px solid #d6e6f5;
}

.need-box .need-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--blue);
  color: var(--white);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.need-box .need-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 2px;
}

.need-box p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.15s, background 0.15s;
}
.btn:active { transform: scale(0.97); }

.btn-outline {
  background: var(--white);
  color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.35);
}
.btn-primary:active { background: var(--blue-dark); }

/* Swipe action bar */
.swipe-bar {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  padding: 14px 16px 10px;
}

.swipe-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.swipe-btn .circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--white);
  box-shadow: 0 6px 18px rgba(44, 62, 80, 0.12);
  transition: transform 0.15s, box-shadow 0.15s;
}
.swipe-btn.sm .circle { width: 48px; height: 48px; }
.swipe-btn:active .circle { transform: scale(0.92); }

.swipe-btn.skip .circle { color: var(--muted); }
.swipe-btn.keep .circle { color: var(--keep); }
.swipe-btn.match .circle {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(30, 136, 229, 0.4);
}
.swipe-btn.match .logo-icon-match {
  width: 34px;
  height: auto;
  display: block;
  pointer-events: none;
}

.swipe-btn .label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}
.swipe-btn .label small {
  display: block;
  font-weight: 500;
  font-size: 9px;
  opacity: 0.85;
}
.swipe-btn.match .label { color: var(--blue); }

/* Toast */
.toast {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: var(--ink);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 50;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Bottom nav — fixed to bottom of app shell */
.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--white);
  border-top: 1px solid var(--line);
  display: flex;
  flex-shrink: 0;
  z-index: 30;
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  position: relative;
}
.bottom-nav a.active { color: var(--blue); }
.bottom-nav a .nav-dot {
  position: absolute;
  top: 8px;
  right: calc(50% - 14px);
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
}

/* Page title */
.page-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin: 16px 0 8px;
  text-transform: none;
}

/* Search */
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: var(--ink);
}
.search-box svg { color: var(--muted); flex-shrink: 0; }

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* List cards */
.list-card {
  display: flex;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}
.list-card .thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(145deg, #90caf9, #1565c0);
}
.list-card .info { flex: 1; min-width: 0; }
.list-card .info h3 {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-card .info .sub {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.list-card .info .tags { gap: 4px; }
.list-card .info .tag { font-size: 10px; padding: 2px 8px; }
.list-card .match-mini {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 800;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 4px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* Chat list */
.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.chat-item:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.chat-item:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); border-bottom: none; }
.chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(145deg, #90caf9, #1565c0);
}
.chat-body { flex: 1; min-width: 0; }
.chat-body .top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3px;
}
.chat-body .name { font-size: 14px; font-weight: 700; }
.chat-body .time { font-size: 11px; color: var(--muted); }
.chat-body .preview {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-unread {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Chat room */
.chat-room-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-room-header .back {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.chat-room-header .who { flex: 1; min-width: 0; }
.chat-room-header .who strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-room-header .who span {
  font-size: 11px;
  color: var(--muted);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  padding-bottom: 80px;
}

.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  position: relative;
}
.bubble.them {
  align-self: flex-start;
  background: var(--white);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.bubble.me {
  align-self: flex-end;
  background: var(--blue);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.bubble .time {
  display: block;
  font-size: 10px;
  opacity: 0.65;
  margin-top: 4px;
  text-align: right;
}

.composer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px calc(10px + var(--safe-b));
  background: var(--white);
  border-top: 1px solid var(--line);
}
.composer input {
  flex: 1;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: var(--bg);
}
.composer input:focus { border-color: var(--blue-mid); }
.composer .send {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Matches */
.match-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}
.match-item .thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(145deg, #90caf9, #1565c0);
}
.match-item .info { flex: 1; min-width: 0; }
.match-item .info h3 { font-size: 14px; font-weight: 800; }
.match-item .info p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.match-item .status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.status.wait { background: #fff3e0; color: #ef6c00; }
.status.ok { background: #e8f5e9; color: #2e7d32; }
.status.recv { background: var(--blue-soft); color: var(--blue-dark); }

.match-item .act {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.mini-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.mini-btn.ok { background: var(--blue); color: var(--white); }
.mini-btn.ng { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }

/* My page */
.profile-hero {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.profile-hero .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
  object-fit: cover;
  background: linear-gradient(145deg, #90caf9, #1565c0);
  border: 3px solid var(--blue-soft);
}
.profile-hero h2 { font-size: 18px; font-weight: 800; }
.profile-hero p { font-size: 12px; color: var(--muted); margin-top: 4px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.stat {
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 6px;
}
.stat strong {
  display: block;
  font-size: 18px;
  color: var(--blue);
  font-weight: 800;
}
.stat span { font-size: 10px; color: var(--muted); font-weight: 600; }

.menu-list {
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.menu-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}
.menu-list a:last-child { border-bottom: none; }
.menu-list a svg:last-child {
  margin-left: auto;
  color: var(--muted);
}
.menu-list .icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Plan / pricing */
.plan-lead {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.plan-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: #fff8e6;
  border: 1px solid #ffe0a3;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.plan-note-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f5a623;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.plan-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 18px 16px 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  border: 1.5px solid var(--line);
}
.plan-card-featured {
  border-color: var(--blue);
  box-shadow: 0 6px 20px rgba(30, 136, 229, 0.12);
  background: linear-gradient(180deg, #f7fbff 0%, var(--white) 42%);
}
.plan-card-label {
  position: absolute;
  top: -1px;
  right: 14px;
  background: var(--blue);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 0 0 8px 8px;
}
.plan-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.plan-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.plan-amount {
  font-size: 28px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.03em;
  line-height: 1;
}
.plan-unit {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.plan-status {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}
.plan-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
  font-weight: 600;
}
.plan-features li svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--blue);
}
.plan-cta {
  width: 100%;
  margin-top: 16px;
  height: 46px;
  font-size: 14px;
}
.plan-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* Auth / register */
.auth-app .main {
  padding-bottom: calc(24px + var(--safe-b));
}
.auth-main { padding-top: 8px; }
.auth-hero {
  text-align: center;
  padding: 8px 8px 20px;
}
.auth-logo {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  object-fit: contain;
}
.auth-brand {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}
.auth-hero p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.auth-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 20px;
  padding: 0 2px;
}
.auth-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.auth-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.auth-sticky {
  position: static;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.auth-sticky .btn {
  width: 100%;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
}
.auth-divider {
  border: 0;
  border-top: 1px solid var(--line, #e5e7eb);
  margin: 28px 0 18px;
}
.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
}
.auth-link {
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.auth-link:hover {
  text-decoration: underline;
}
.auth-sent-msg {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.auth-sent .btn { width: 100%; }
.auth-resend {
  margin-top: 10px;
}
.auth-verified {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: #2e7d32;
}
.auth-verified svg { flex-shrink: 0; }

.login-captcha-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.login-captcha-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px;
  border-radius: 12px;
  background: rgba(30, 136, 229, 0.08);
  border: 1px solid rgba(30, 136, 229, 0.2);
}
.login-captcha-img {
  display: block;
  height: 56px;
  width: auto;
  max-width: 100%;
  border: none;
  border-radius: 8px;
  background: transparent;
}
.login-captcha-reload {
  flex: 0 0 auto;
  height: 56px;
  min-width: 72px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 12px;
  white-space: nowrap;
}
.login-captcha-fields input {
  letter-spacing: 0.12em;
}

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.empty p { font-size: 13px; margin-top: 8px; }

/* Private memo */
.btn-block {
  width: 100%;
}

.memo-private-badge {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--keep);
  background: #eceff1;
}

.memo-private-card .form-card-title {
  width: 100%;
}

.memo-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
  color: var(--keep);
  background: #eceff1;
  position: relative;
  top: -2px;
}

.card-memo-preview {
  background: #f7f9fb;
  border: 1px dashed #cfd8dc;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.card-memo-preview .card-memo-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--keep);
  margin-bottom: 4px;
}

.card-memo-preview p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-stack.kept-stack {
  display: block;
  align-items: stretch;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 14px 20px;
  -webkit-overflow-scrolling: touch;
}

.memo-privacy-banner {
  font-size: 11px;
  font-weight: 600;
  color: var(--keep);
  background: #eceff1;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
  text-align: center;
}

.kept-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kept-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.kept-item:active {
  transform: scale(0.985);
}

.kept-item .thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--blue-soft);
}

.kept-item .info {
  flex: 1;
  min-width: 0;
}

.kept-item .info h3 {
  font-size: 14px;
  font-weight: 800;
}

.kept-item .info > p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.kept-memo {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
  background: #f7f9fb;
  border-radius: 8px;
  padding: 8px 10px;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kept-memo.is-empty {
  color: var(--muted);
  font-style: normal;
  border: 1px dashed #d5dde5;
  background: transparent;
}

.kept-chevron {
  color: var(--muted);
  margin-top: 18px;
  flex-shrink: 0;
}

/* Side drawer */
.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 45, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 40;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 78%;
  max-width: 300px;
  background: var(--white);
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  z-index: 45;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }

.drawer .drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--line);
}
.drawer .drawer-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}
.drawer nav { padding: 12px 0; }
.drawer nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.drawer nav a:active,
.drawer nav a.active {
  background: var(--blue-soft);
  color: var(--blue);
}

/* Forms */
.sub-header {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}
.sub-header .back {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex-shrink: 0;
  color: var(--ink);
}
.sub-header .back:active { background: var(--blue-soft); }
.sub-header h1 {
  flex: 1;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  margin-right: 36px;
  letter-spacing: -0.02em;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.form-card .form-card-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-card .form-card-title::before {
  content: "";
  width: 3px;
  height: 14px;
  background: var(--blue);
  border-radius: 2px;
}

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field label .req {
  color: var(--danger);
  margin-left: 2px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a96a3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue-mid);
  background: var(--white);
}
.field .hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.avatar-edit {
  display: flex;
  align-items: center;
  gap: 14px;
}
.avatar-edit .preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(145deg, #90caf9, #1565c0);
  border: 3px solid var(--blue-soft);
  flex-shrink: 0;
}
.avatar-edit .avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.btn-sm {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-sm.primary {
  background: var(--blue);
  color: var(--white);
}
.btn-sm.ghost {
  background: var(--bg);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.choice input { display: none; }
.choice.on {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--blue-dark);
}

/* Tag search (partner / large catalogs) */
.tag-search { position: relative; }

.tag-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
  margin-bottom: 10px;
}
.tag-selected:empty { margin-bottom: 0; }

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 700;
}
.tag-chip .tag-remove {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  color: var(--blue);
  background: rgba(30, 136, 229, 0.12);
}
.tag-chip .tag-remove:hover { background: rgba(30, 136, 229, 0.22); }

.tag-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.tag-search-box:focus-within {
  border-color: var(--blue-mid);
  background: var(--white);
}
.tag-search-box svg { color: var(--muted); flex-shrink: 0; }
.tag-search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  min-width: 0;
}

.tag-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: auto;
  z-index: 20;
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  list-style: none;
}
.tag-suggest li {
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.tag-suggest li:last-child { border-bottom: none; }
.tag-suggest li:hover,
.tag-suggest li.is-active {
  background: var(--blue-soft);
  color: var(--blue-dark);
}
.tag-suggest li.tag-suggest-empty {
  color: var(--muted);
  font-weight: 500;
  cursor: default;
}
.tag-suggest li.tag-suggest-empty:hover { background: transparent; color: var(--muted); }
.tag-suggest li .cat {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 2px;
}

.tag-popular {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.tag-popular-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-right: 2px;
}
.tag-quick {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}
.tag-quick:hover {
  border-color: var(--blue-mid);
  color: var(--blue);
  background: var(--blue-soft);
}
.tag-quick.is-on {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.sticky-save {
  position: sticky;
  bottom: calc(var(--nav-h) + 8px + var(--safe-b));
  margin-top: 8px;
  padding-top: 4px;
  z-index: 10;
}
.sticky-save .btn {
  width: 100%;
  height: 48px;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(30, 136, 229, 0.35);
}
.main.form-main {
  padding-bottom: calc(var(--nav-h) + 24px + var(--safe-b));
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden { display: none !important; }

/* Detail modal */
.modal-root {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.modal-root[hidden] { display: none !important; }
.modal-root.open { pointer-events: auto; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 45, 0.45);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.modal-root.open .modal-backdrop { opacity: 1; }

.modal-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(92%, 860px);
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateY(108%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-root.open .modal-sheet { transform: translateY(0); }

.modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #cfd8e3;
  margin: 10px auto 0;
  flex-shrink: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  flex-shrink: 0;
}
.modal-header h2 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
}
.modal-close:active { background: var(--blue-soft); }

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 14px calc(12px + var(--safe-b));
  background: var(--white);
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

/* Detail tabs */
.detail-tabs {
  display: flex;
  gap: 0;
  background: var(--white);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: -2px;
  z-index: 2;
}
.detail-tab {
  flex: 1;
  height: 36px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.detail-tab.active {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 10px rgba(30, 136, 229, 0.28);
}
.detail-panel[hidden] { display: none !important; }

.review-summary-compact {
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.review-summary-compact .review-score {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}
.review-summary-compact .review-score strong {
  font-size: 22px;
}
.review-summary-compact .review-score .stars {
  margin: 0;
}
.review-jump {
  justify-self: end;
  align-self: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}
.product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.product-top strong {
  font-size: 14px;
  font-weight: 800;
}
.product-card p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.product-price {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--blue-dark);
}

.list-card {
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}

@media (min-width: 720px) {
  .modal-root { align-items: center; padding: 24px; }
  .modal-sheet {
    max-width: 560px;
    max-height: min(88vh, 820px);
    border-radius: 20px;
    transform: translateY(24px) scale(0.98);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .modal-root.open .modal-sheet {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  .modal-handle { display: none; }
  .modal-footer { border-radius: 0 0 20px 20px; }
}

/* Detail + reviews */
.detail-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.detail-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(145deg, #90caf9, #1565c0);
}
.detail-match {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--white);
  border-radius: 14px;
  padding: 8px 12px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  line-height: 1.15;
}
.detail-match strong {
  display: block;
  color: var(--blue);
  font-size: 16px;
  font-weight: 800;
}
.detail-match span {
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
}
.detail-head { margin-bottom: 14px; }
.detail-head h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.review-summary {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  align-items: center;
}
.review-score {
  text-align: center;
}
.review-score strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}
.review-score .stars {
  color: #f5a623;
  font-size: 12px;
  letter-spacing: 1px;
  margin: 4px 0;
}
.review-score span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.review-bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}
.bar-row i {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.bar-row i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 50%);
  background: var(--blue);
  border-radius: inherit;
}

.bullet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bullet-list li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.review-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.review-item:last-of-type { border-bottom: none; padding-bottom: 0; }
.review-item:first-of-type { padding-top: 0; }
.review-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.review-top strong { font-size: 13px; }
.review-top .stars { color: #f5a623; font-size: 12px; letter-spacing: 1px; }
.review-item p {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.review-item time {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.detail-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
  position: sticky;
  bottom: calc(var(--nav-h) + 8px + var(--safe-b));
  z-index: 10;
}
.detail-cta .btn { text-decoration: none; }

/* Board / PR */
.board-intro p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 14px;
}

.pr-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.pr-card h3 {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  margin: 8px 0 6px;
  letter-spacing: -0.02em;
}
.pr-card > p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pr-type {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.pr-type.want {
  background: #fff3e0;
  color: #ef6c00;
}
.pr-type.offer {
  background: #e8f5e9;
  color: #2e7d32;
}
.pr-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.fab {
  position: absolute;
  right: 16px;
  bottom: calc(var(--nav-h) + 16px + var(--safe-b));
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(30, 136, 229, 0.4);
}
.fab:active { transform: scale(0.97); }

@media (min-width: 960px) {
  .fab { display: none; }
  .pr-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
  }
  .detail-cover { height: 260px; }
  .main:has(> .pr-card) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
    align-content: start;
  }
  .main:has(> .pr-card) > .board-intro,
  .main:has(> .pr-card) > .search-box,
  .main:has(> .pr-card) > .filter-row,
  .main:has(> .pr-card) > .fab {
    grid-column: 1 / -1;
  }
  .main:has(> .pr-card) > .pr-card { margin-bottom: 0; }
}

/* =========================================================
   Responsive — tablet / PC
   ========================================================= */

/* Tablet */
@media (min-width: 720px) {
  .app {
    max-width: 720px;
    box-shadow: 0 0 0 1px var(--line);
  }

  .main {
    padding: 20px 24px calc(var(--nav-h) + 20px + var(--safe-b));
  }

  .main.swipe-main {
    padding-left: 24px;
    padding-right: 24px;
  }

  .card-photo { height: 240px; }

  .company-name { font-size: 20px; }

  .list-card .thumb {
    width: 88px;
    height: 88px;
  }
}

/* Desktop / large PC */
@media (min-width: 960px) {
  body {
    background:
      radial-gradient(ellipse 80% 50% at 10% -10%, rgba(30, 136, 229, 0.12), transparent 50%),
      radial-gradient(ellipse 60% 40% at 100% 0%, rgba(44, 62, 80, 0.06), transparent 45%),
      var(--bg);
  }

  .app-shell {
    display: block;
    height: 100dvh;
    overflow: hidden;
  }

  .app {
    max-width: 1200px;
    margin: 0 auto;
    height: 100dvh;
    max-height: 100dvh;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    box-shadow: 0 0 0 1px var(--line);
    background: var(--bg);
    overflow: hidden;
  }

  /* Permanent sidebar */
  .drawer {
    position: relative;
    grid-column: 1;
    grid-row: 1 / -1;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 100%;
    transform: none !important;
    border-right: 1px solid var(--line);
    z-index: 5;
    padding: 28px 0 20px;
    overflow-y: auto;
  }

  .drawer.open { transform: none !important; }

  .drawer-overlay {
    display: none !important;
  }

  .drawer .drawer-brand {
    padding: 0 20px 24px;
  }

  .drawer .drawer-brand img {
    width: 40px;
    height: 40px;
  }

  .drawer nav a {
    padding: 12px 20px;
    margin: 2px 10px;
    border-radius: 10px;
    font-size: 14px;
  }

  .drawer nav a:hover {
    background: var(--bg);
    color: var(--ink);
  }

  .drawer nav a.active {
    background: var(--blue-soft);
    color: var(--blue);
  }

  .drawer-foot {
    margin-top: auto;
    padding: 16px 20px 0;
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.04em;
  }

  /* Content columns */
  .app-header {
    grid-column: 2;
    grid-row: 1;
    height: 64px;
    padding: 0 28px;
  }

  .app-header [data-drawer-open] {
    display: none;
  }

  .app-header .brand {
    margin-right: auto;
  }

  .brand-text { font-size: 20px; }
  .brand img { width: 32px; height: 32px; }

  .tabs {
    grid-column: 2;
    grid-row: 2;
    padding: 0 20px;
  }

  .tab {
    padding: 14px 18px 12px;
    font-size: 14px;
  }

  .main {
    grid-column: 2;
    grid-row: 3;
    padding: 24px 32px 32px;
    overflow-y: auto;
  }

  .main.swipe-main {
    padding: 20px 32px 24px;
  }

  /* Pages without tabs: main uses remaining rows */
  .app:not(:has(> .tabs)) {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .app:not(:has(> .tabs)) .main {
    grid-row: 2;
  }

  /* Chat room / pages without sidebar */
  .app:not(:has(> .drawer)) {
    grid-template-columns: minmax(0, 1fr);
    max-width: 860px;
  }

  .app:not(:has(> .drawer)) .app-header,
  .app:not(:has(> .drawer)) .main {
    grid-column: 1;
  }

  .bottom-nav {
    display: none !important;
  }

  .toast {
    top: 80px;
    left: calc(50% + 124px);
  }

  .app:not(:has(> .drawer)) .toast {
    left: 50%;
  }

  /* Swipe / match card */
  .swipe-main {
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
  }

  .card-stack {
    min-height: 520px;
  }

  .card-photo {
    height: 280px;
  }

  .match-card {
    border-radius: 20px;
  }

  .swipe-bar {
    gap: 40px;
    padding: 20px 16px 8px;
  }

  .swipe-btn .circle {
    width: 64px;
    height: 64px;
  }

  .swipe-btn.sm .circle {
    width: 52px;
    height: 52px;
  }

  .swipe-btn .label {
    font-size: 11px;
  }

  .swipe-btn:hover .circle {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(44, 62, 80, 0.16);
  }

  .btn:hover {
    filter: brightness(1.03);
  }

  /* List search — 2 columns (exclude form pages like board-detail) */
  .main:has(> .list-card):not(.form-main) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
    align-content: start;
  }

  .main:has(> .list-card):not(.form-main) > .page-title,
  .main:has(> .list-card):not(.form-main) > .search-box,
  .main:has(> .list-card):not(.form-main) > .filter-row {
    grid-column: 1 / -1;
  }

  .list-card {
    margin-bottom: 0;
    transition: box-shadow 0.2s, transform 0.2s;
  }

  .list-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
  }

  /* Matches */
  .main:has(> .match-item) {
    max-width: 720px;
  }

  .match-item:hover {
    box-shadow: var(--shadow);
  }

  /* Chat list */
  .main:has(.chat-item) {
    max-width: 720px;
  }

  .chat-item:hover {
    background: #f8fbfe;
  }

  /* Chat room */
  .app:not(:has(> .drawer)) .composer {
    left: 0;
    right: 0;
    transform: none;
    max-width: none;
  }

  .app:not(:has(> .drawer)) {
    position: relative;
  }

  .messages {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 96px;
  }

  .bubble {
    max-width: 70%;
    font-size: 14px;
  }

  /* My page */
  .main:has(> .profile-hero) {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }

  .profile-hero {
    margin-bottom: 0;
    position: sticky;
    top: 0;
  }

  /* Forms */
  .main.form-main {
    max-width: 780px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: 40px;
  }

  .sticky-save {
    bottom: 16px;
  }

  .sticky-save .btn {
    max-width: 320px;
    margin-left: auto;
    display: flex;
  }

  .form-card {
    padding: 20px;
  }

  .page-title {
    font-size: 24px;
  }

  .sub-header h1 {
    font-size: 18px;
    text-align: left;
    margin-right: 0;
  }
}

/* Wide desktop — form 2-col */
@media (min-width: 1100px) {
  .app {
    max-width: 1280px;
    grid-template-columns: 260px minmax(0, 1fr);
  }

  #profileForm,
  #partnerForm {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
  }

  #profileForm > .sticky-save,
  #partnerForm > .sticky-save,
  #partnerForm > .need-box {
    grid-column: 1 / -1;
  }

  .toast {
    left: calc(50% + 130px);
  }
}

/* Legal footer & documents */
.app-footer {
  margin-top: 28px;
  padding: 18px 4px 8px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.app-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.app-footer-nav a {
  color: var(--ink-soft);
  padding: 2px 6px;
}

.app-footer-nav a:active {
  color: var(--blue);
}

.app-footer-sep {
  color: var(--line);
  padding: 0 2px;
  user-select: none;
}

.app-footer-copy {
  margin-top: 10px;
  font-size: 10px;
  color: var(--muted);
}

.legal-doc {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 16px 24px;
  box-shadow: var(--shadow-sm);
}

.legal-doc-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.legal-doc-note {
  font-size: 12px;
  color: var(--muted);
  background: var(--blue-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.legal-doc-section {
  margin-bottom: 18px;
}

.legal-doc-section h2 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.legal-doc-section p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.legal-doc-dl {
  display: grid;
  gap: 14px;
}

.legal-doc-dl > div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.legal-doc-dl > div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.legal-doc-dl dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.legal-doc-dl dd {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.legal-doc-updated {
  margin-top: 20px;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}

.legal-doc-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.legal-doc-body h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 16px 0 6px;
}

.legal-doc-body p {
  margin-bottom: 10px;
}

.legal-doc-body .legal-doc-note {
  font-size: 12px;
  color: var(--muted);
  background: var(--blue-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.auth-app .app-footer {
  margin-top: 20px;
  padding-bottom: 4px;
}
