/* Segian Reptile — 前台 */

/* 上方工具列 */
.util { background: var(--canopy); color: var(--canopy-ink); font-size: 12px; }
.util .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; flex-wrap: wrap; }
.util-l, .util-r { display: flex; align-items: center; gap: 14px; }
.util a { opacity: 0.85; }
.util a:hover { opacity: 1; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.4; }
.cartbtn { display: inline-flex; align-items: center; gap: 7px; background: var(--ember); color: var(--ember-ink); padding: 4px 12px; border-radius: 999px; font-weight: 500; }
.cartbtn .n { background: rgba(0, 0, 0, 0.22); border-radius: 999px; padding: 0 6px; font-size: 11px; font-family: var(--mono); }

/* 招牌 */
.masthead { background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.masthead .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding-top: 26px; padding-bottom: 26px; }
.brand { text-align: center; grid-column: 2; }
.brand .zh { font-family: var(--serif); font-weight: 700; font-size: 32px; letter-spacing: 0.3em; line-height: 1.1; text-indent: 0.3em; }
.brand .en { font-family: var(--mono); font-size: 10px; letter-spacing: 0.52em; color: var(--moss); margin-top: 8px; text-indent: 0.52em; }
.mh-l { font-size: 12px; color: var(--muted); line-height: 1.8; }
.mh-l b { display: block; color: var(--ink); font-weight: 500; letter-spacing: 0.05em; }
.mh-r { display: flex; justify-content: flex-end; }
.search { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface-2); max-width: 260px; width: 100%; }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 14px; color: var(--ink); font: inherit; font-size: 13px; }
.search input::placeholder { color: var(--muted); }
.search button { padding: 0 14px; color: var(--moss); }

/* 分類列 */
.nav { background: var(--canopy); color: var(--canopy-ink); position: sticky; top: 0; z-index: 30; }
.nav .wrap { display: flex; gap: 2px; overflow-x: auto; }
.nav a { padding: 12px 15px; font-size: 13.5px; white-space: nowrap; opacity: 0.82; border-bottom: 2px solid transparent; }
.nav a:hover { opacity: 1; border-bottom-color: var(--ember); }
.nav a.on { opacity: 1; border-bottom-color: var(--ember); font-weight: 500; }

/* 公告 */
.notice { background: var(--surface-2); border-bottom: 1px solid var(--line-soft); font-size: 12.5px; color: var(--ink-2); }
.notice .wrap { display: flex; gap: 10px; align-items: baseline; padding-top: 9px; padding-bottom: 9px; flex-wrap: wrap; }
.notice .tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; background: var(--moss); color: #fff; padding: 2px 7px; border-radius: 2px; }

.crumb { font-size: 12px; color: var(--muted); padding: 16px 0 10px; }
.crumb span { margin: 0 6px; opacity: 0.5; }

.cols { display: grid; grid-template-columns: 214px 1fr; gap: 28px; align-items: start; padding-bottom: 56px; }

/* 側欄 */
.aside { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 60px; }
.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.panel h3 { margin: 0; font-family: var(--serif); font-size: 14px; letter-spacing: 0.1em; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: baseline; gap: 8px; }
.panel h3 em { font-style: normal; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; color: var(--moss); text-transform: uppercase; }
.panel .body { padding: 8px 6px; }
.panel .notes { padding: 12px 14px; font-size: 12.5px; color: var(--ink-2); line-height: 1.9; }

.tree { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.tree button { display: flex; width: 100%; justify-content: space-between; gap: 8px; align-items: center; padding: 7px 9px; border-radius: 2px; text-align: left; color: var(--ink-2); }
.tree button:hover { background: var(--surface-2); color: var(--ink); }
.tree button.on { background: var(--canopy); color: var(--canopy-ink); font-weight: 500; }
.tree button.on .c { color: var(--canopy-ink); opacity: 0.7; }
.tree .c { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tree .grp { padding: 12px 9px 4px; font-size: 10.5px; letter-spacing: 0.16em; color: var(--muted); font-family: var(--mono); text-transform: uppercase; }
.tree .sub button { padding-left: 18px; }

.fgroup { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.fgroup:last-child { border-bottom: 0; }
.fgroup > span { display: block; font-size: 11px; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 12px; color: var(--ink-2); }
.chip:hover { border-color: var(--moss); color: var(--ink); }
.chip.on { background: var(--moss); border-color: var(--moss); color: #fff; }
/* 表現標籤篩選（複選，取交集） */
.trow { display: grid; grid-template-columns: 30px 1fr; gap: 7px; align-items: baseline; margin-bottom: 6px; }
.trow:last-child { margin-bottom: 0; }
.trow__h { font-size: 10.5px; color: var(--muted); letter-spacing: 0.08em; }
.chip i { font-style: normal; font-size: 10px; color: var(--muted); margin-left: 4px; }
.chip.on i { color: rgba(255, 255, 255, 0.7); }

/* 個體身上的標籤 */
.ctags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 10.5px; letter-spacing: 0.04em; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 2px; padding: 1px 5px; }

.switch { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; }
.switch input { appearance: none; width: 34px; height: 19px; border-radius: 999px; background: var(--line); position: relative; transition: background 0.18s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); transition: transform 0.18s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.switch input:checked { background: var(--moss); }
.switch input:checked::after { transform: translateX(15px); }

/* 列表標頭 */
.mhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.mhead h1 { margin: 0; font-family: var(--serif); font-size: 23px; letter-spacing: 0.06em; font-weight: 700; }
.mhead p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.sorts { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.sorts button { padding: 7px 14px; font-size: 12.5px; color: var(--ink-2); border-right: 1px solid var(--line-soft); }
.sorts button:last-child { border-right: 0; }
.sorts button:hover { background: var(--surface-2); }
.sorts button.on { background: var(--canopy); color: var(--canopy-ink); }

.active-f { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; font-size: 12px; color: var(--muted); }
.active-f .x { border: 1px solid var(--moss); color: var(--moss); border-radius: 999px; padding: 2px 9px; font-size: 12px; }
.active-f .x:hover { background: var(--moss); color: #fff; }

/* 商品格 */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s; }
.card:hover { border-color: var(--moss); box-shadow: var(--shadow); transform: translateY(-2px); }
.thumb { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); cursor: pointer; overflow: hidden; }
.thumb svg, .thumb img { display: block; width: 100%; height: 100%; }
.badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.badge { font-size: 10.5px; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 2px; background: var(--canopy); color: var(--canopy-ink); }
.badge.gene { background: var(--ember); color: var(--ember-ink); }
.badge.hold { background: var(--hold); color: #1a1405; }
.badge.sold { background: var(--sold); color: #fff; }
.sex { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; font-size: 13px; color: var(--ink-2); }
.cinfo { padding: 12px 13px 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ccode { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--moss); }
.cname { font-family: var(--serif); font-size: 15.5px; font-weight: 500; line-height: 1.4; text-wrap: balance; }
.cname small { font-family: var(--sans); font-size: 12px; color: var(--muted); font-weight: 400; }
.spec { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 12px; color: var(--ink-2); margin: 2px 0 0; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-family: var(--mono); font-size: 11.5px; }
.cfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px 13px; margin-top: 10px; border-top: 1px dashed var(--line-soft); }
.price { font-family: var(--mono); font-weight: 500; font-size: 17px; color: var(--ink); }
.price s { font-size: 11px; color: var(--muted); display: block; font-weight: 400; }
.add { background: var(--ember); color: var(--ember-ink); border-radius: 999px; padding: 6px 15px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.add:hover { filter: brightness(1.08); }
.add[disabled] { background: var(--line); color: var(--muted); cursor: not-allowed; filter: none; }
.card.off .thumb svg, .card.off .thumb img { filter: grayscale(0.75) opacity(0.7); }

.empty { grid-column: 1 / -1; text-align: center; padding: 70px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 30px; }
.pager button { min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.pager button:hover:not([disabled]) { border-color: var(--moss); color: var(--ink); }
.pager button.on { background: var(--canopy); border-color: var(--canopy); color: var(--canopy-ink); }
.pager button[disabled] { opacity: 0.35; cursor: not-allowed; }

/* 頁尾 */
footer { background: var(--canopy); color: var(--canopy-ink); padding: 38px 0 26px; font-size: 12.5px; }
.fcols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.fcols h4 { margin: 0 0 10px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; opacity: 0.6; text-transform: uppercase; }
.fcols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; opacity: 0.85; }
.fbrand { font-family: var(--serif); font-size: 18px; letter-spacing: 0.2em; }
.fnote { opacity: 0.7; line-height: 1.8; margin-top: 10px; max-width: 34ch; }
.legal { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.12); opacity: 0.55; font-size: 11.5px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* 抽屜與彈窗 */
html.noscroll { overflow: hidden; padding-right: var(--sbw, 0px); }
.scrim { position: fixed; inset: 0; background: rgba(10, 16, 13, 0.55); backdrop-filter: blur(2px); z-index: 50; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); background: var(--surface); z-index: 51; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0, 0, 0, 0.25); }
.dhead { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.dhead h2 { margin: 0; font-family: var(--serif); font-size: 16px; letter-spacing: 0.1em; }
.dbody { flex: 1; overflow-y: auto; padding: 6px 18px; }
.citem { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.citem .mini { width: 52px; height: 65px; flex: none; border-radius: 2px; overflow: hidden; background: var(--surface-2); }
.citem .mini svg, .citem .mini img { width: 100%; height: 100%; display: block; object-fit: cover; }
.citem .t { flex: 1; min-width: 0; }
.citem .t b { display: block; font-family: var(--serif); font-weight: 500; font-size: 14px; }
.citem .t span { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.citem .rm { color: var(--muted); font-size: 11.5px; text-decoration: underline; }
.citem .rm:hover { color: var(--ember); }
.dfoot { border-top: 1px solid var(--line-soft); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.sumline { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
.sumline.total { font-size: 17px; color: var(--ink); font-family: var(--mono); font-weight: 500; }
.checkout { background: var(--ember); color: var(--ember-ink); border-radius: 999px; padding: 11px; text-align: center; font-weight: 500; }
.checkout[disabled] { background: var(--line); color: var(--muted); cursor: not-allowed; }
.cform { display: flex; flex-direction: column; gap: 8px; }
.cform label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.cform input, .cform textarea { border: 1px solid var(--line); border-radius: 2px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13px; padding: 7px 10px; }
.cform textarea { resize: vertical; min-height: 52px; }
.fineprint { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.7; }

.modal { position: fixed; z-index: 51; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(860px, 94vw); max-height: 88vh; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; background: var(--surface); border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4); }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; }
.mpic { background: var(--surface-2); aspect-ratio: 4 / 5; }
.mpic svg, .mpic img { width: 100%; height: 100%; display: block; object-fit: cover; }
.mpics { background: var(--surface-2); }
.mthumbs { display: flex; flex-wrap: wrap; gap: 5px; padding: 7px; }
.mthumb { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; padding: 0; background: none; }
.mthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mthumb:hover { border-color: var(--moss); }
.mthumb.on { border-color: var(--moss); box-shadow: 0 0 0 2px var(--moss); }

/* 形態示意圖 —— 詳情視窗裡的小卡 */
.morphref { display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: center; margin: 0; padding: 10px; border: 1px solid var(--line-soft); border-radius: 2px; background: var(--surface-2); }
.morphref__pic { aspect-ratio: 4 / 5; border-radius: 2px; overflow: hidden; background: var(--surface); }
.morphref__pic svg { width: 100%; height: 100%; display: block; }
.morphref figcaption { min-width: 0; }
.morphref b { display: block; font-size: 13px; font-weight: 500; margin-bottom: 3px; }
.morphref p { margin: 0 0 4px; font-size: 12px; line-height: 1.65; color: var(--ink-2); }
.morphref small { font-size: 10.5px; color: var(--muted); }

/* 形態示意圖 —— 篩選到單一形態時，列表上方的橫幅 */
.morphbanner { display: grid; grid-template-columns: 86px 1fr; gap: 16px; align-items: center; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
.morphbanner__pic { aspect-ratio: 4 / 5; border-radius: 2px; overflow: hidden; background: var(--surface-2); }
.morphbanner__pic svg { width: 100%; height: 100%; display: block; }
.morphbanner figcaption { min-width: 0; }
.morphbanner b { font-size: 15px; font-weight: 500; font-family: var(--serif); letter-spacing: 0.04em; }
.morphbanner .grp { margin-left: 8px; font-size: 10.5px; letter-spacing: 0.08em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.morphbanner .grp.gene { color: var(--moss); border-color: var(--moss); }
.morphbanner p { margin: 5px 0 4px; font-size: 12.5px; line-height: 1.7; color: var(--ink-2); }
.morphbanner small { font-size: 10.5px; color: var(--muted); }

.mside { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 14px; }
.mside h2 { margin: 0; font-family: var(--serif); font-size: 24px; letter-spacing: 0.04em; line-height: 1.35; }
.mtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.mtable th { text-align: left; font-weight: 400; color: var(--muted); padding: 7px 0; width: 6.5em; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.mtable td { padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-family: var(--mono); font-size: 12.5px; }
.mnote { background: var(--surface-2); border-left: 2px solid var(--moss); padding: 11px 13px; font-size: 12.5px; color: var(--ink-2); line-height: 1.8; }
.mbuy { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.close { position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; font-size: 16px; color: var(--ink-2); z-index: 2; }

@media (max-width: 980px) {
  .cols { grid-template-columns: 1fr; }
  .aside { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .masthead .wrap { grid-template-columns: 1fr; text-align: center; }
  .mh-l { display: none; }
  .mh-r { justify-content: center; }
  .brand { grid-column: 1; }
  .fcols { grid-template-columns: 1fr 1fr; }
  .mgrid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .aside { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cfoot { flex-direction: column; align-items: stretch; gap: 8px; }
  .add { text-align: center; }
  .fcols { grid-template-columns: 1fr; }
}
