* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
}

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: #fff;
}
.logo {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex: none; text-decoration: none;
  background: #fff; transition: background .15s;
}
.logo:hover { background: #e9e9e9; }
.nav-pill {
  height: 48px; padding: 0 16px; border-radius: 24px; border: 0;
  background: transparent; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; font-size: 16px; font-weight: 600;
  color: #111; text-decoration: none; flex: none; transition: background .15s;
}
.nav-pill:hover { background: #e9e9e9; }
.nav-pill.active { background: #111; color: #fff; }
.searchbox {
  flex: 1; display: flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 16px; border-radius: 24px;
  background: #e9e9e9; min-width: 0;
}
.searchbox:focus-within { box-shadow: 0 0 0 4px rgba(0, 116, 232, .35); background: #fff; }
.searchbox svg { flex: none; color: #5f5f5f; }
.searchbox input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 16px; color: #111;
}
.count-chip {
  flex: none; font-size: 14px; color: #5f5f5f; padding: 0 8px;
  white-space: nowrap;
}
.agent-cta {
  height: 48px; padding: 0 18px; border-radius: 24px; flex: none;
  display: flex; align-items: center; gap: 6px;
  background: #e60023; color: #fff; font-size: 16px; font-weight: 700;
  text-decoration: none; transition: background .15s;
}
.agent-cta:hover { background: #ad081b; }

/* ---------- auth ---------- */
.auth-slot { position: relative; flex: none; display: flex; align-items: center; }
.gsi-holder { min-width: 90px; }
.signin-pill {
  height: 44px; padding: 0 18px; border-radius: 22px; border: 0; flex: none;
  background: #111; color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.signin-pill:hover { background: #333; }
.signin-card { text-align: center; max-width: 400px; }
.signin-card .gsi-holder { display: flex; justify-content: center; min-width: 0; margin-top: 6px; }
.auth-avatar {
  width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0;
  overflow: hidden; cursor: pointer; background: #e9e9e9;
  font-size: 17px; font-weight: 700; color: #111;
  display: flex; align-items: center; justify-content: center;
}
.auth-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-menu {
  position: absolute; top: 54px; right: 0; z-index: 60;
  background: #fff; border-radius: 16px; padding: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  display: flex; flex-direction: column; gap: 2px; min-width: 230px;
}
.auth-email {
  font-size: 12.5px; color: #8a8a8a; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; padding: 4px 10px 0;
}
.auth-plan {
  font-size: 14px; font-weight: 700; color: #111; text-decoration: none;
  padding: 4px 10px 8px; border-bottom: 1px solid #efefef; margin-bottom: 4px;
  white-space: nowrap;
}
.auth-plan:hover { text-decoration: underline; }
.menu-item {
  border: 0; background: transparent; cursor: pointer; font-family: inherit;
  text-align: left; font-size: 14.5px; font-weight: 600; color: #111;
  padding: 10px; border-radius: 10px; white-space: nowrap;
}
.menu-item:hover { background: #f1f1f1; }
.menu-item.danger { color: #cc0000; }

/* ---------- account panels ---------- */
.panel-card {
  position: relative; background: #fff; border-radius: 20px; width: 100%;
  max-width: 520px; margin: auto; padding: 26px;
  display: flex; flex-direction: column; gap: 8px;
}
.panel-card h2 { margin: 0 0 4px; font-size: 20px; }
.panel-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
  border: 0; border-radius: 50%; background: #f0f0f0; cursor: pointer; font-size: 15px;
}
.panel-close:hover { background: #e2e2e2; }
.panel-body { display: flex; flex-direction: column; gap: 12px; }
.panel-note { color: #666; font-size: 13.5px; line-height: 1.55; margin: 0; }
.key-list { display: flex; flex-direction: column; gap: 6px; }
.key-row {
  display: flex; align-items: center; gap: 10px; font-size: 13.5px;
  background: #f7f7f7; border-radius: 10px; padding: 9px 12px;
}
.key-row code { font-size: 12.5px; }
.key-label {
  border: 0; background: transparent; cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 700; color: #111; padding: 0;
  text-decoration: underline dotted #bbb; text-underline-offset: 3px;
  white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis;
}
.key-rename {
  border: 1px solid #0074e8; border-radius: 8px; padding: 4px 8px;
  font-size: 13px; font-family: inherit; outline: none; width: 130px;
}
.toast-action {
  border: 0; background: #fff; color: #111; border-radius: 14px;
  font-size: 13px; font-weight: 700; padding: 5px 12px; margin-left: 12px;
  cursor: pointer; font-family: inherit;
}
.key-row span { color: #777; }
.key-row > :nth-child(2) { flex: 1; }
.key-reveal { display: flex; flex-direction: column; gap: 8px; }
.key-reveal .md-code { word-break: break-all; }
.platform-row { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-row .btn { height: 38px; font-size: 13.5px; padding: 0 13px; }

/* ---------- board picker ---------- */
.board-picker {
  position: fixed; z-index: 300; min-width: 260px; max-width: 320px;
  background: #fff; border-radius: 16px; padding: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,.25);
  display: flex; flex-direction: column; gap: 2px;
  max-height: 60vh; overflow-y: auto;
}
.bp-title {
  font-size: 13px; font-weight: 700; color: #5f5f5f;
  padding: 8px 12px 6px; text-align: center;
}
.bp-row {
  border: 0; background: transparent; text-align: left; cursor: pointer;
  font-size: 15px; font-weight: 600; color: #111; font-family: inherit;
  padding: 10px 12px; border-radius: 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bp-row:hover { background: #e9e9e9; }
.bp-row.bp-remove { color: #cc0000; }
.bp-create { display: flex; gap: 6px; padding: 6px 4px; }
.bp-create input {
  flex: 1; min-width: 0; border: 1px solid #ddd; border-radius: 10px;
  padding: 8px 10px; font-size: 14px; font-family: inherit; outline: none;
}
.bp-create input:focus { border-color: #0074e8; }
.bp-create button {
  border: 0; border-radius: 10px; background: #e60023; color: #fff;
  font-size: 14px; font-weight: 700; padding: 0 14px; cursor: pointer;
  font-family: inherit;
}
.bp-create button:hover { background: #ad081b; }

/* ---------- board filter chips (saved view) ---------- */
.board-chips {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 4px 16px;
}
.board-chips .chip {
  border: 0; border-radius: 20px; background: #e9e9e9; color: #111;
  font-size: 14px; font-weight: 600; font-family: inherit;
  padding: 8px 14px; cursor: pointer;
}
.board-chips .chip:hover { background: #dadada; }
.board-chips .chip.active { background: #111; color: #fff; }

/* ---------- masonry ---------- */
.grid-wrap { padding: 4px 16px 80px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-auto-rows: 8px;
  gap: 0 16px;
  justify-content: center;
}
@media (max-width: 540px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 0 8px; }
  .grid-wrap { padding: 4px 8px 80px; }
}

.pin { position: relative; cursor: zoom-in; }
.pin-media {
  position: relative; border-radius: 16px; overflow: hidden; background: #e9e9e9;
}
.pin-media img {
  display: block; width: 100%; height: auto; min-height: 60px;
}
.pin-media video.preview {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 16px;
}
.pin-overlay {
  position: absolute; inset: 0; border-radius: 16px;
  background: rgba(0,0,0,0); transition: background .15s;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 12px; opacity: 0; pointer-events: none;
}
.pin:hover .pin-overlay { background: rgba(0,0,0,.35); opacity: 1; }
.pin-overlay .save-btn {
  align-self: flex-end;
  background: #e60023; color: #fff; border: 0; border-radius: 24px;
  height: 40px; padding: 0 16px; font-size: 15px; font-weight: 700;
  cursor: pointer; pointer-events: auto;
}
.pin-overlay .save-btn:hover { background: #ad081b; }
.pin-overlay .save-btn.is-saved { background: #111; }
.pin-overlay .save-btn.is-saved:hover { background: #333; }
.pin-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.pin-overlay .pin-stats {
  display: flex; gap: 10px; color: #fff; font-size: 13px; font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; flex: none;
  background: rgba(255,255,255,.92); color: #111; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto;
}
.icon-btn:hover { background: #fff; }
.pin-title {
  margin: 6px 4px 14px; font-size: 13.5px; font-weight: 600; line-height: 1.3;
  color: #111; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.play-badge {
  position: absolute; top: 10px; left: 10px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.play-badge svg { width: 12px; height: 12px; }

.sentinel { height: 400px; }
.loading-row {
  display: flex; justify-content: center; padding: 32px; color: #5f5f5f; font-size: 14px;
}
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid #e9e9e9; border-top-color: #e60023;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  max-width: 460px; margin: 96px auto; text-align: center; color: #5f5f5f;
  padding: 0 24px;
}
.empty-state .big { font-size: 56px; margin-bottom: 16px; }
.empty-state h2 { color: #111; font-size: 22px; margin: 0 0 8px; }
.empty-state p { font-size: 15px; line-height: 1.6; margin: 0; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.85);
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 40px 16px;
}
.closeup { width: 100%; max-width: 1016px; }
.related-section { margin-top: 8px; padding-bottom: 40px; }
.related-section h2 {
  color: #fff; font-size: 18px; font-weight: 700; text-align: center;
  margin: 24px 0 12px; text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.related-section .pin-title { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.modal {
  background: #fff; border-radius: 32px; width: 100%;
  display: flex; overflow: hidden; box-shadow: 0 8px 40px rgba(0,0,0,.3);
  min-height: 420px;
}
.modal-media {
  flex: 1 1 55%; background: #000; display: flex;
  align-items: center; justify-content: center; min-width: 0;
}
.modal-media video, .modal-media img {
  width: 100%; height: auto; max-height: 82vh; display: block; object-fit: contain;
}
.modal-body {
  flex: 1 1 45%; min-width: 0; padding: 28px;
  display: flex; flex-direction: column; gap: 14px; max-height: 82vh; overflow-y: auto;
}
.modal-close {
  position: fixed; top: 18px; left: 18px; z-index: 110;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: #fff; color: #111; font-size: 20px; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.modal-close:hover { background: #e9e9e9; }
.modal-body h1 { font-size: 24px; line-height: 1.25; margin: 0; font-weight: 700; }
.modal-body .desc { color: #5f5f5f; font-size: 14px; line-height: 1.55; margin: 0; }
.byline { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: #e9e9e9; color: #111; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center; text-transform: uppercase;
}
.byline a { color: #111; font-weight: 600; text-decoration: none; font-size: 15px; }
.byline a:hover { text-decoration: underline; }
.byline .model-tag { color: #5f5f5f; font-size: 13px; }
.stat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-chip {
  background: #e9e9e9; border-radius: 16px; padding: 6px 12px;
  font-size: 13px; font-weight: 600; color: #111;
}
.stat-chip span { color: #5f5f5f; font-weight: 500; margin-right: 4px; }
.prompt-box {
  background: #f4f4f4; border-radius: 16px; padding: 16px;
  font-size: 13.5px; line-height: 1.65; white-space: pre-wrap;
  word-break: break-word; color: #211922; max-height: 320px; overflow-y: auto;
}
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  height: 44px; padding: 0 18px; border-radius: 22px; border: 0;
  font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-red { background: #e60023; color: #fff; }
.btn-red:hover { background: #ad081b; }
.btn-gray { background: #e9e9e9; color: #111; }
.btn-gray:hover { background: #dadada; }
.btn-dark { background: #111; color: #fff; }
.btn-dark:hover { background: #333; }
.btn-red.is-saved { background: #111; }
.btn-red.is-saved:hover { background: #333; }
.rel-sentinel { height: 300px; }

@media (max-width: 760px) {
  .modal { flex-direction: column; }
  .modal-media video, .modal-media img { max-height: 50vh; }
  .modal-body { max-height: none; }
  .modal-backdrop { padding: 16px 8px; }
  .count-chip { display: none; }
}

/* Mobile top bar: pills + auth on row one, search drops to its own row. */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; padding: 8px 12px; row-gap: 6px; }
  .searchbox { order: 9; flex-basis: 100%; height: 42px; }
  .logo { width: 40px; height: 40px; }
  .nav-pill { height: 40px; padding: 0 12px; font-size: 15px; }
  .auth-slot { margin-left: auto; }
  .auth-avatar { width: 40px; height: 40px; }
  .gsi-holder { transform: scale(.9); transform-origin: right center; }
}

/* ---------- agent ---------- */
.agent-layout {
  display: flex; height: calc(100vh - 72px); overflow: hidden;
}
.agent-sidebar {
  width: 250px; flex: none; border-right: 1px solid #eee; padding: 12px;
  display: flex; flex-direction: column; gap: 12px; overflow-y: auto;
}
.agent-sidebar .btn { justify-content: center; }
.conv-list { display: flex; flex-direction: column; gap: 2px; }
.conv-item {
  display: flex; align-items: center; gap: 6px; padding: 9px 10px;
  border-radius: 10px; cursor: pointer; font-size: 13.5px; color: #333;
}
.conv-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item:hover { background: #f2f2f2; }
.conv-item.active { background: #e9e9e9; font-weight: 600; color: #111; }
.conv-del {
  border: 0; background: transparent; color: #aaa; cursor: pointer;
  font-size: 12px; padding: 2px 4px; border-radius: 6px; visibility: hidden;
}
.conv-item:hover .conv-del { visibility: visible; }
.conv-del:hover { color: #cc0000; background: #e4e4e4; }
.agent-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-scroll { flex: 1; overflow-y: auto; }
.chat-log { max-width: 820px; margin: 0 auto; padding: 24px 20px 40px; }
.agent-hero { text-align: center; padding: 64px 12px 24px; }
.hero-badge {
  display: inline-block; background: #ffe4e8; color: #e60023;
  font-size: 13px; font-weight: 700; border-radius: 16px; padding: 6px 14px; margin-bottom: 14px;
}
.agent-hero h1 { font-size: 30px; margin: 0 0 10px; }
.agent-hero p { color: #5f5f5f; font-size: 15px; line-height: 1.6; margin: 0 0 24px; }
.hero-suggestions { display: flex; flex-direction: column; gap: 8px; max-width: 440px; margin: 0 auto; }
.suggestion {
  border: 1px solid #e0e0e0; background: #fff; border-radius: 14px;
  padding: 12px 16px; font-size: 14px; color: #111; cursor: pointer;
  text-align: left; font-family: inherit;
}
.suggestion:hover { background: #f6f6f6; }
.gsi-holder.gate { display: flex; justify-content: center; margin-top: 8px; }

.msg-user {
  background: #f1f1f1; border-radius: 18px; padding: 12px 16px;
  margin: 18px 0 18px auto; max-width: 78%; width: fit-content;
  font-size: 15px; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
}
.agent-turn { margin: 6px 0 26px; }
.tl-status {
  display: flex; align-items: center; gap: 8px; color: #8a8a8a;
  font-size: 13.5px; padding: 6px 0;
}
.tl-status.done { color: #a5a5a5; }
.tl-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #c9c9c9; flex: none;
}
.tl-dot.spin { background: #e60023; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.tl-tool {
  display: flex; align-items: center; gap: 8px; color: #444;
  font-size: 13.5px; padding: 6px 0;
}
.tl-icon { flex: none; }
.tl-tool a { color: #0074e8; }
.tl-tool-error {
  color: #b45309; background: #fef7e7; border-radius: 10px;
  font-size: 13px; padding: 8px 12px; margin: 4px 0;
}
.agent-pin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px; margin: 10px 0 14px;
}
.agent-pin { text-decoration: none; color: #111; }
.ap-thumb {
  border-radius: 12px; overflow: hidden; background: #ececec; aspect-ratio: 3/4;
}
.ap-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agent-pin:hover .ap-thumb { filter: brightness(.92); }
.ap-title {
  font-size: 12.5px; font-weight: 600; line-height: 1.3; margin: 6px 2px 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ap-stats { font-size: 11.5px; color: #777; margin: 0 2px; }
.recipe-card {
  border: 1px solid #e4e4e4; border-radius: 14px; padding: 14px; margin: 10px 0;
}
.rc-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.rc-head img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.rc-title { font-weight: 700; font-size: 15px; }
.rc-model { color: #777; font-size: 12.5px; }
.rc-prompt { max-height: 260px; overflow-y: auto; margin: 0; }
.agent-text { font-size: 15px; line-height: 1.65; color: #1c1c1c; }
.agent-text p { margin: 10px 0; }
.agent-text ul { margin: 8px 0; padding-left: 22px; }
.agent-text h3 { font-size: 16.5px; margin: 16px 0 6px; }
.agent-text code {
  background: #f1f1f1; border-radius: 5px; padding: 1px 5px; font-size: 13px;
}
.md-code {
  background: #f6f6f6; border: 1px solid #ececec; border-radius: 12px;
  padding: 12px 14px; font-size: 12.5px; line-height: 1.55; overflow-x: auto;
  white-space: pre-wrap; word-break: break-word;
}
.limit-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 1px solid #e4e4e4; border-radius: 14px; padding: 16px; margin: 12px 0;
}
.lc-title { font-weight: 700; font-size: 15px; }
.lc-sub { color: #666; font-size: 13.5px; margin-top: 2px; }
.chat-input-wrap { padding: 10px 20px 18px; }
.chat-input {
  max-width: 820px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px;
  border: 1px solid #ddd; border-radius: 22px; padding: 10px 10px 10px 18px;
  box-shadow: 0 2px 14px rgba(0,0,0,.06); background: #fff;
}
.chat-input textarea {
  flex: 1; border: 0; outline: 0; resize: none; font-family: inherit;
  font-size: 15px; line-height: 1.5; max-height: 160px; background: transparent;
}
.chat-input button {
  width: 38px; height: 38px; border-radius: 50%; border: 0; flex: none;
  background: #e60023; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.chat-input button:disabled { background: #e9a5ae; cursor: default; }
.chat-input button:not(:disabled):hover { background: #ad081b; }
@media (max-width: 760px) {
  .agent-sidebar { display: none; }
  .agent-layout { height: calc(100vh - 64px); }
}

/* ---------- SSR pin page ---------- */
.pin-page { max-width: 760px; margin: 0 auto; padding: 20px 20px 80px; }
.pin-page h1 { font-size: 26px; margin: 8px 0 6px; }
.pin-page .desc { color: #5f5f5f; font-size: 15px; line-height: 1.6; margin: 0 0 8px; }
.pp-meta { color: #777; font-size: 13.5px; margin-bottom: 14px; }
.pp-meta a { color: #111; font-weight: 600; }
.pp-media video, .pp-media img {
  width: 100%; max-height: 70vh; border-radius: 16px; background: #000; object-fit: contain;
}
.pin-page h2 { font-size: 18px; margin: 22px 0 8px; }
.pp-related { padding-left: 20px; line-height: 2; font-size: 14.5px; }
.pp-related a { color: #0074e8; }

/* ---------- pricing ---------- */
.pricing-wrap { max-width: 1020px; margin: 0 auto; padding: 32px 20px 80px; text-align: center; }
.pricing-wrap h1 { font-size: 34px; margin: 12px 0 8px; }
.pricing-sub { color: #5f5f5f; font-size: 16px; margin: 0 0 28px; }
.interval-toggle {
  display: inline-flex; background: #e9e9e9; border-radius: 24px; padding: 4px; margin-bottom: 32px;
}
.interval-toggle button {
  border: 0; background: transparent; border-radius: 20px; padding: 10px 18px;
  font-size: 15px; font-weight: 700; cursor: pointer; color: #111; font-family: inherit;
}
.interval-toggle button.active { background: #111; color: #fff; }
.save-tag { font-size: 12px; font-weight: 700; color: #e60023; margin-left: 4px; }
.interval-toggle button.active .save-tag { color: #ffb3be; }
.plans {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px; text-align: left;
}
.plan-card {
  position: relative; border: 1px solid #e0e0e0; border-radius: 20px; padding: 28px 24px;
  display: flex; flex-direction: column; gap: 6px; background: #fff;
}
.plan-card.featured { border: 2px solid #e60023; box-shadow: 0 8px 28px rgba(230,0,35,.12); }
.plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: #e60023; color: #fff; font-size: 12px; font-weight: 700;
  border-radius: 12px; padding: 4px 12px; white-space: nowrap;
}
.plan-card h2 { margin: 0; font-size: 20px; }
.plan-price { font-size: 40px; font-weight: 800; line-height: 1.1; }
.plan-period { color: #5f5f5f; font-size: 13.5px; min-height: 18px; }
.plan-card ul { margin: 14px 0 22px; padding: 0 0 0 18px; color: #333; font-size: 14.5px; line-height: 1.9; flex: 1; }
.plan-cta { justify-content: center; width: 100%; }
.pricing-note { color: #8f8f8f; font-size: 13px; margin-top: 28px; }

.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: #111; color: #fff; border-radius: 24px; padding: 12px 22px;
  font-size: 15px; font-weight: 600; z-index: 200;
  animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- language switcher ---------- */
.lang-select {
  height: 40px; padding: 0 30px 0 12px; border: 0; border-radius: 20px;
  background: transparent; color: #111; font-family: inherit;
  font-size: 15px; font-weight: 600; cursor: pointer; flex: none;
  appearance: none; transition: background .15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23555'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; background-size: 18px;
}
.lang-select:hover { background-color: #e9e9e9; }
.lang-select:focus-visible { outline: 2px solid #0074e8; outline-offset: 2px; }
@media (max-width: 760px) {
  .lang-select { padding: 0 26px 0 8px; font-size: 14px; max-width: 96px; }
}

/* ---------- taxonomy filter bar (L1 › L2 › L3) ---------- */
.tax-bar { display: flex; flex-direction: column; gap: 6px; padding: 4px 4px 12px; }
.tax-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tax-row .chip {
  border: 0; border-radius: 20px; background: #e9e9e9; color: #111;
  font-size: 14px; font-weight: 600; font-family: inherit;
  padding: 8px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s;
}
.tax-row .chip:hover { background: #dadada; }
.tax-row .chip.active { background: #111; color: #fff; }
.tax-row.depth-1 .chip { font-size: 13px; padding: 6px 12px; background: #f1f1f1; }
.tax-row.depth-2 .chip { font-size: 13px; padding: 6px 12px; background: #fafafa; box-shadow: inset 0 0 0 1px #e3e3e3; }
.tax-row.depth-1 .chip.active, .tax-row.depth-2 .chip.active { background: #111; color: #fff; box-shadow: none; }
.chip-count { font-weight: 500; opacity: .6; font-size: 12px; }
.chip.active .chip-count { opacity: .75; }

/* pin card: L3 label under the title */
.pin-tax { margin: -10px 4px 14px; font-size: 12px; color: #767676; }

/* modal: clickable L1 › L2 › L3 breadcrumb per label */
.tax-crumbs { display: flex; flex-direction: column; gap: 6px; }
.tax-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.tax-crumb .crumb {
  border: 0; background: #e9e9e9; border-radius: 14px; padding: 4px 10px;
  font: inherit; font-size: 13px; font-weight: 600; color: #111; cursor: pointer;
}
.tax-crumb .crumb:hover { background: #dadada; }
.tax-crumb .sep { color: #999; font-size: 13px; }
@media (max-width: 540px) {
  .tax-row .chip { font-size: 13px; padding: 7px 12px; }
}
