:root {
  --bg: #ffffff;
  --bg-card: #ffffff;
  --bg-muted: #f5f5f7;
  --text: #111111;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --accent: #ef4444;
  --accent-pressed: #dc2626;
  --accent-soft: #fef2f2;
  --success: #22c55e;
  --success-pressed: #16a34a;
  --radius: 16px;
  --radius-sm: 12px;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 8px 28px rgba(17, 17, 17, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}

.app {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  background: var(--bg);
  overflow: hidden;
}

.panel {
  display: none;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
}

.panel.is-active {
  display: flex;
}

.panel[hidden],
[hidden] {
  display: none !important;
}

.panel-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px calc(var(--nav-h) + var(--safe-b) + 28px);
  -webkit-overflow-scrolling: touch;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 8px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.topbar-title {
  padding-top: 18px;
}

.page-title {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--text);
  border-radius: 999px;
}

.icon-btn.circle {
  border: 1px solid var(--border);
  background: var(--bg-muted);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

.badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 10px;
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(36px, 10vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.hero-title .accent {
  color: var(--accent);
}

.banner-card {
  display: block;
  margin: 0 0 16px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 6px 18px rgba(17, 17, 17, 0.05);
  text-decoration: none;
  color: inherit;
}

.banner-card:active {
  transform: scale(0.995);
}

.banner-media {
  position: relative;
  height: 168px;
  background: #f3f4f6;
  overflow: hidden;
}

.topic-media {
  position: relative;
  height: auto;
  aspect-ratio: 1024 / 574;
  background: #f7f5f2;
}

.banner-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}

.topic-media img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: center center;
}

.banner-carousel {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.banner-track {
  position: relative;
  aspect-ratio: 1024 / 574;
  background: #f3f4f6;
}

.banner-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.banner-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.banner-slide[hidden] {
  display: block !important;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.banner-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 0;
  padding: 0;
  pointer-events: auto;
}

.banner-dot.is-active {
  width: 16px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.banner-pill {
  position: absolute;
  top: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.banner-pill .dot {
  width: 6px;
  height: 6px;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.banner-pill-left {
  left: 8px;
  background: rgba(17, 17, 17, 0.72);
  color: #fff;
}

.banner-pill-right {
  right: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.banner-body {
  padding: 12px 12px 10px;
  background: var(--accent);
  color: #fff;
}

.topic-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px;
  background: transparent;
  color: #fff;
}

.topic-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 12px 12px;
  background: transparent;
  color: #111;
  pointer-events: none;
}

.topic-caption-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.topic-caption .banner-qc {
  border-color: rgba(17, 17, 17, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: #111;
  backdrop-filter: blur(8px);
}

.topic-caption .banner-title,
.topic-caption .banner-sub {
  color: #111;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.topic-caption .banner-sub {
  opacity: 0.78;
}

.topic-name {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(17, 17, 17, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(17, 17, 17, 0.08);
}

.banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.banner-qc {
  display: inline-flex;
  align-items: center;
  max-width: 78%;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banner-price {
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.banner-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.banner-sub {
  margin: 0;
  opacity: 0.9;
  font-size: 12px;
  line-height: 1.35;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease;
}

a.btn-success,
a.btn-accent {
  color: #fff;
}

.btn:active {
  transform: scale(0.985);
}

.btn-block {
  width: 100%;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:active {
  background: var(--accent-pressed);
}

.btn-success {
  background: var(--success);
  color: #fff;
  margin-top: 14px;
}

.btn-success:active {
  background: var(--success-pressed);
}

.btn-google {
  width: calc(100% - 24px);
  margin: 4px 12px 14px;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  border-radius: 14px;
  gap: 10px;
  font-weight: 700;
}

.btn-google:active {
  background: #f7f8f8;
}

.arrow {
  font-weight: 600;
}

.link-discord {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 14px 0 22px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
}

.discord-ico {
  width: 18px;
  height: 18px;
}

.search-form {
  margin: 18px 0 20px;
}

.search-trigger {
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

.search-placeholder {
  color: #9ca3af;
  font-size: 16px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  min-height: 48px;
  border-radius: 999px;
  background: var(--bg-muted);
  border: 0;
  box-shadow: none;
}

.search-field:focus-within {
  background: #ececef;
}

.search-field svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.search-field input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
  font-size: 16px;
}

.pill-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 18px;
  scrollbar-width: none;
}

.pill-row::-webkit-scrollbar {
  display: none;
}

.cat-row {
  display: flex;
  gap: 14px;
  margin: 4px -20px 8px;
  padding: 4px 20px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.cat-row::-webkit-scrollbar {
  display: none;
}

.cat-item {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 68px;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
}

.cat-thumb {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #f3f4f6;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  box-shadow: none;
}

.cat-thumb img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
}

.cat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
}

.cat-item:active .cat-thumb {
  transform: scale(0.96);
}

.cat-item:active .cat-label {
  color: var(--text);
}

.pill-row .pill {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.pill-row .pill.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.sheet-card {
  margin-top: 4px;
  margin-bottom: 0;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 4px 18px rgba(17, 17, 17, 0.04);
}

.sheet-hub .hub-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.hub-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #ecfdf5;
  color: var(--success);
  flex-shrink: 0;
}

.hub-icon svg {
  width: 22px;
  height: 22px;
}

.hub-copy h2 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hub-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.hub-open {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.hub-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 8px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--bg-muted);
  scrollbar-width: none;
}

.hub-tags::-webkit-scrollbar {
  display: none;
}

.tag {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.tag-check {
  flex: 0 0 auto;
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #ecfdf5;
  color: var(--success);
  font-size: 14px;
  font-weight: 800;
}

.sheet-hub .btn-success {
  margin-top: 0;
}

.sort-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.sort-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.sort-btn.is-active {
  color: var(--text);
  border-color: #d1d5db;
  background: var(--bg-muted);
}

.browse-search {
  margin-bottom: 14px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 14px;
}

.section-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-link {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.section-more {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  background: #fff;
}

.section-more:active {
  background: var(--bg-muted);
}

.product-rail {
  display: flex;
  gap: 10px;
  margin: 0 -20px 8px;
  padding: 2px 20px 10px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-left: 20px;
  scrollbar-width: none;
}

.product-rail::-webkit-scrollbar {
  display: none;
}

.product-rail .product-card {
  flex: 0 0 auto;
  /* ~2 cards + peek of the next one */
  width: min(40vw, 158px);
  scroll-snap-align: start;
}

.product-rail .product-media {
  aspect-ratio: 1 / 0.92;
}

.product-rail .product-body {
  padding: 10px 9px 9px;
  gap: 7px;
}

.product-rail .product-title {
  font-size: 11px;
  min-height: 2.5em;
}

.product-rail .product-buy,
.product-rail .mini-btn {
  min-height: 36px;
  height: 36px;
}

.page-standalone {
  position: absolute;
  inset: 0;
}

/* Cart page */
.cart-topbar {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  gap: 8px;
}

.cart-topbar .page-title {
  text-align: center;
}

.category-topbar {
  grid-template-columns: 44px 1fr 44px;
}

.category-topbar .icon-btn {
  justify-self: start;
}

.category-topbar .page-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cart-top-btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
}

.cart-top-btn:last-child {
  justify-self: end;
}

.cart-scroll {
  background: #f7f8fa;
}

.cart-section-label {
  margin: 4px 2px 10px;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cart-list {
  display: grid;
  gap: 12px;
}

.cart-item {
  position: relative;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1.5px solid #d1fae5;
  box-shadow: 0 4px 16px rgba(17, 17, 17, 0.04);
}

.cart-check {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--success);
  color: #fff;
  display: grid;
  place-items: center;
  z-index: 1;
}

.cart-check svg {
  width: 12px;
  height: 12px;
}

.cart-thumb {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  background: #f3f4f6;
}

.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.cart-item-main {
  min-width: 0;
  padding-right: 28px;
}

.cart-item-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-price {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.cart-qty-control {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-muted);
}

.cart-qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  background: transparent;
}

.cart-qty-btn:active {
  background: #e8e8ed;
}

.cart-qty-value {
  min-width: 24px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.cart-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #9ca3af;
  background: var(--bg-muted);
}

.cart-remove svg {
  width: 14px;
  height: 14px;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 16px;
  border-radius: 18px;
  border: 1px dashed var(--border);
  background: #fff;
}

.cart-empty h2 {
  margin: 12px 0 6px;
  font-size: 16px;
}

.cart-empty p {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.cart-summary {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(17, 17, 17, 0.04);
}

.cart-summary-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cart-summary-count {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.cart-summary-total {
  text-align: right;
}

.cart-summary-total strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.cart-summary-total span {
  color: #9ca3af;
  font-size: 11px;
  font-weight: 600;
}

.cart-summary-note {
  margin: 0 0 14px;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.45;
}

.cart-checkout {
  gap: 8px;
}

.cart-top-btn:active,
.cart-qty-btn:active,
.cart-remove:active,
.cart-checkout:active {
  transform: scale(0.97);
}

.cart-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.cart-sheet[hidden] {
  display: none;
}

.cart-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.cart-sheet.is-open .cart-sheet-backdrop {
  opacity: 1;
}

.cart-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: #fff;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.08);
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

.cart-sheet.is-open .cart-sheet-panel {
  transform: translateY(0);
}

.cart-sheet-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  min-height: 36px;
}

.cart-sheet-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  padding: 0 72px;
}

.cart-sheet-head .cart-top-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.cart-sheet-note {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.cart-sheet-list {
  flex: 1;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  min-height: 0;
  padding-bottom: 12px;
}

.cart-sheet-row {
  display: grid;
  grid-template-columns: 56px 1fr 28px;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  text-align: left;
  color: inherit;
}

.cart-sheet-row:active {
  background: #f8f8fa;
}

.cart-sheet-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
}

.cart-sheet-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.cart-sheet-meta {
  min-width: 0;
}

.cart-sheet-meta strong {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-sheet-meta span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.cart-sheet-check {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  color: #fff;
}

.cart-sheet-check.is-on {
  border-color: var(--success);
  background: var(--success);
}

.cart-sheet-check svg {
  width: 14px;
  height: 14px;
}

.cart-sheet-actions {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
}

.cart-copy-all {
  gap: 8px;
  background: var(--bg-muted);
  color: var(--text);
  border: 1px solid var(--border);
}

.cart-copy-all:active {
  transform: scale(0.99);
}

.cart-remove-opened {
  min-height: 40px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  border: 0;
}

.cart-remove-opened:disabled {
  opacity: 0.4;
}

.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  z-index: 90;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.cart-toast[hidden] {
  display: none;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #f0f0f2;
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

.product-media {
  aspect-ratio: 1;
  background: #f3f4f6;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 10px 10px;
  flex: 1;
}

.product-title {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
  min-height: 2.6em;
}

.product-price {
  margin: 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.product-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.product-buy:active {
  background: var(--accent-pressed);
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-btn {
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #9ca3af;
  background: #fff;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.mini-btn svg {
  width: 18px;
  height: 18px;
}

.mini-btn.is-on {
  border-color: #fecaca;
  color: var(--accent);
  background: #fef2f2;
}

.mini-btn-cart.is-cart {
  border-color: #fecaca;
  color: var(--accent);
  background: #fef2f2;
  font-size: 13px;
  font-weight: 800;
}

.mini-btn-cart .cart-qty {
  min-width: 1ch;
  line-height: 1;
}

.mini-btn.is-press {
  transform: scale(0.94);
}

.empty-inline {
  text-align: center;
  color: var(--text-secondary);
  padding: 28px 8px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60%;
  color: var(--text-secondary);
}

.empty-state h2 {
  margin: 12px 0 6px;
  color: var(--text);
  font-size: 22px;
}

.empty-state p {
  margin: 0;
  max-width: 24ch;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--bg-muted);
  display: grid;
  place-items: center;
  color: var(--text);
}

.empty-icon svg {
  width: 28px;
  height: 28px;
}

.recent-scroll {
  display: flex;
  flex-direction: column;
}

.empty-state-air {
  flex: 1;
  min-height: calc(100dvh - 220px);
  justify-content: center;
  gap: 0;
  padding: 28px 28px 40px;
  border: 0;
  background: transparent;
}

.empty-state-air .empty-icon-soft {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #9ca3af;
  margin-bottom: 18px;
}

.empty-state-air .empty-icon-soft svg {
  width: 30px;
  height: 30px;
}

.empty-state-air h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.empty-state-air p {
  margin: 0 auto;
  max-width: 26ch;
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.5;
}

.empty-state-air .empty-cta {
  margin-top: 22px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  width: auto;
  align-self: center;
}

.profile-scroll {
  padding-top: 8px;
}

.discord-banner {
  width: 100%;
  display: block;
  margin: 16px 0 4px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #5865f2;
  box-shadow: 0 10px 24px rgba(88, 101, 242, 0.22);
}

.discord-banner img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1024 / 384;
  object-fit: contain;
  object-position: center;
}

.section-label {
  margin: 18px 4px 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.profile-card {
  background: var(--bg-muted);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 4px;
}

.profile-card + .section-label {
  margin-top: 18px;
}

.profile-card .btn-google {
  width: calc(100% - 24px);
  margin: 12px;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
}

.profile-card > :last-child {
  border-bottom: 0;
}

.profile-row.static {
  cursor: default;
}

.profile-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-row-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.profile-row-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.row-meta {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

.chevron {
  color: #c0c4cc;
  font-size: 22px;
  line-height: 1;
}

.confirm-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
}

.confirm-sheet[hidden] {
  display: none !important;
}

.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.confirm-card {
  position: relative;
  z-index: 1;
  width: min(100%, 300px);
  padding: 22px 18px 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(17, 17, 17, 0.18);
  text-align: center;
}

.confirm-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.confirm-card p {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.confirm-btn {
  min-height: 46px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.confirm-cancel {
  background: #ececf0;
}

.confirm-ok {
  background: #3a3a3e;
  color: #fff;
}

.confirm-cancel:active,
.confirm-ok:active {
  transform: scale(0.98);
}

.confirm-toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  z-index: 95;
  transform: translateX(-50%);
  max-width: calc(100% - 40px);
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(17, 17, 17, 0.88);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.confirm-toast[hidden] {
  display: none !important;
}

.share-sheet {
  position: fixed;
  inset: 0;
  z-index: 92;
}

.share-sheet[hidden] {
  display: none !important;
}

.share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.share-sheet.is-open .share-backdrop {
  opacity: 1;
}

.share-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: #fff;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.12);
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

.share-sheet.is-open .share-panel {
  transform: translateY(0);
}

.share-handle {
  width: 42px;
  height: 4px;
  margin: 2px auto 14px;
  border-radius: 999px;
  background: #e5e7eb;
}

.share-head {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.share-app-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.share-app-ico svg {
  width: 24px;
  height: 24px;
}

.share-head-text h2 {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.share-head-text p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.share-close {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.share-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 16px 12px;
  border-radius: 18px;
  background: #f7f8fa;
  border: 1px solid var(--border);
}

.share-qr-wrap img {
  width: 148px;
  height: 148px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  box-sizing: border-box;
}

.share-qr-wrap p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.share-link-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
}

.share-link-label {
  display: block;
  margin-bottom: 4px;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.share-link-box p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-all;
}

.share-copy {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.share-copy:active {
  background: var(--accent-pressed);
}

.share-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.share-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: 16px;
  background: #f7f8fa;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  border: 0;
}

.share-action:active {
  transform: scale(0.98);
  background: #eef0f3;
}

.share-action-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}

.share-action-ico svg {
  width: 20px;
  height: 20px;
}

.share-action-discord {
  background: #5865f2;
  border-color: #5865f2;
  color: #fff;
}

.p-ico {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--text);
  background: transparent;
}

.p-ico svg {
  width: 20px;
  height: 20px;
}

.tabbar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(12px + var(--safe-b));
  height: var(--nav-h);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  padding: 6px 4px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 20;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  color: #9ca3af;
  font-size: 10px;
  font-weight: 600;
  border-radius: 16px;
  text-decoration: none;
}

.tab-icon {
  position: relative;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.tab-icon svg {
  width: 22px;
  height: 22px;
  grid-area: 1 / 1;
}

.tab-icon-fill {
  display: none;
}

.tab.is-active {
  color: var(--accent);
  font-weight: 700;
}

.tab.is-active .tab-icon-line {
  display: none;
}

.tab.is-active .tab-icon-fill {
  display: block;
}

/* Tools pages */
.tools-page {
  position: absolute;
  inset: 0;
  z-index: 46;
  display: flex;
  flex-direction: column;
  background: #f5f5f7;
}

.tools-page[hidden] {
  display: none !important;
}

.tools-top {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--border);
  background: #f5f5f7;
}

.tools-top h1 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tools-back {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ebebef;
  color: var(--text);
}

.tools-back svg {
  width: 18px;
  height: 18px;
}

.tools-top-spacer {
  width: 40px;
  height: 40px;
}

.tools-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}

.tools-body-form {
  background: #fff;
}

.tools-card {
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(17, 17, 17, 0.04);
}

.tools-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #f0f0f2;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.tools-row:last-child {
  border-bottom: 0;
}

.tools-row:active {
  background: #fafafa;
}

.tools-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 800;
}

.tools-ico svg {
  width: 24px;
  height: 24px;
}

.tools-ico-link {
  background: #0ea5e9;
}

.tools-ico-yen {
  background: #10b981;
}

.tools-row-copy {
  min-width: 0;
  flex: 1;
}

.tools-row-title {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tools-row-sub {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.3;
}

.tools-row .chevron {
  color: #d1d5db;
  font-size: 22px;
  font-weight: 400;
}

.tools-lead {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.tools-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.tools-input-wrap {
  position: relative;
  margin-bottom: 14px;
}

.tools-input-wrap input {
  width: 100%;
  padding: 14px 48px 14px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
  outline: none;
}

.tools-input-wrap input:focus {
  border-color: #fda4af;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.tools-icon-action {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
}

.tools-icon-action svg {
  width: 18px;
  height: 18px;
}

.link-results {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.link-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
}

.link-result.is-primary {
  border-color: #fecdd3;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.08);
}

.link-result-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  background: var(--accent);
}

.link-result-main {
  min-width: 0;
  flex: 1;
}

.link-result-name {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.link-result-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 2px 6px;
}

.link-result-url {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 11px;
  word-break: break-all;
  line-height: 1.35;
}

.link-copy-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--bg-muted);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.link-copy-btn svg {
  width: 16px;
  height: 16px;
}

.currency-input-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  margin-bottom: 14px;
}

.currency-yen {
  color: #9ca3af;
  font-size: 28px;
  font-weight: 800;
}

.currency-input-card input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 30px;
  font-weight: 800;
  outline: none;
}

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

.currency-tabs::-webkit-scrollbar {
  display: none;
}

.currency-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.currency-tab.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.currency-result-card {
  padding: 24px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  text-align: center;
}

.currency-result {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.currency-rate {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.currency-updated {
  margin: 14px 0 0;
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
}

.tools-toast {
  position: absolute;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 60;
  padding: 10px 16px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.tools-toast[hidden] {
  display: none !important;
}

/* Spreadsheet overlay */
.sheet-page {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.sheet-page[hidden] {
  display: none !important;
}

.sheet-page-top {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 10px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.sheet-back,
.sheet-ext {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--bg-muted);
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
}

.sheet-back svg {
  width: 20px;
  height: 20px;
}

.sheet-page-heading h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}

.sheet-page-heading p {
  margin: 1px 0 0;
  color: var(--text-secondary);
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
}

.sheet-page-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 12px;
  -webkit-overflow-scrolling: touch;
}

.sheet-view[hidden] {
  display: none !important;
}

.sheet-banner {
  line-height: 0;
  background: #f3f4f6;
}

.sheet-banner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 168px;
  object-fit: cover;
}

.sheet-cta-list {
  display: grid;
  gap: 0;
  padding: 4px 0 0;
  border-bottom: 1px solid #e8e8e8;
}

.sheet-cta {
  display: block;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #ececec;
  border-radius: 0;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sheet-cta-blue {
  color: #1155cc;
}

.sheet-cta-red {
  color: var(--accent);
}

.sheet-tip {
  margin: 10px 16px 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.sheet-tip-save {
  text-align: center;
  font-weight: 600;
}

.sheet-tip-save::before {
  content: "🔎 ";
}

.sheet-guide {
  margin: 14px 16px 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  font-style: italic;
  text-align: center;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.sheet-jump {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid #ececec;
  border-bottom: 1px solid #ececec;
}

.sheet-jump-item {
  display: block;
  padding: 16px 10px;
  border-right: 1px solid #ececec;
  border-bottom: 1px solid #ececec;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sheet-jump-item:nth-child(2n) {
  border-right: 0;
}

.sheet-jump-item.is-active {
  background: #f0fdf4;
  color: #15803d;
}

.sheet-partner {
  padding: 16px;
}

.sheet-partner-label {
  margin: 0 0 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.sheet-partner-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--success);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.sheet-partner-btn:active {
  background: var(--success-pressed);
}

.sheet-tabs {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  border-top: 1px solid #dadce0;
  background: #f8f9fa;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-x: auto;
}

.sheet-tab {
  flex: 1 0 auto;
  min-width: 0;
  padding: 12px 14px;
  color: #5f6368;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-top: 2px solid transparent;
}

.sheet-tab.is-active {
  background: #e8f0fe;
  color: #1967d2;
  border-top-color: #1967d2;
}

.sheet-cat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 4px;
}

.sheet-cat-back {
  color: #1967d2;
  font-size: 13px;
  font-weight: 700;
}

.sheet-cat-bar span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sheet-cat-picker[hidden] {
  display: none !important;
}

.sheet-cats,
.sheet-subs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 16px 4px;
}

.sheet-cat {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  text-align: center;
}

.sheet-cat.is-active {
  border-color: var(--success);
  box-shadow: 0 0 0 1px var(--success);
}

.sheet-cat img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  background: #f5f5f7;
  display: block;
  padding: 6px;
}

.sheet-cat span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  background: var(--success);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  min-height: 28px;
}

.sheet-cat.is-active span {
  background: #16a34a;
}

.sheet-search {
  margin: 10px 16px 8px;
}

.sheet-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 16px 8px;
}

.sheet-section-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sheet-section-head span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.sheet-list {
  border-top: 1px solid var(--border);
}

.sheet-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #ececec;
}

.sheet-row-thumb {
  display: block;
  line-height: 0;
}

.sheet-row img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f4f6;
  display: block;
}

.sheet-row-main {
  min-width: 0;
}

.sheet-row-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sheet-row-price {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.sheet-row-link {
  color: #1155cc;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 8px 4px;
}

.sheet-loading {
  margin: 24px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.sheet-load-more {
  display: block;
  width: calc(100% - 32px);
  margin: 14px 16px 24px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.sheet-load-more:active {
  background: var(--bg-muted);
}

/* Search sub-page */
.search-page {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.search-page[hidden] {
  display: none !important;
}

.search-page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 8px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: #fff;
}

.search-page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.search-page-form {
  padding: 4px 20px 16px;
  border-bottom: 0;
  background: #fff;
}

.search-page-form .search-field {
  width: 100%;
  border-radius: 999px;
  background: var(--bg-muted);
  border: 0;
}

.search-cancel {
  flex-shrink: 0;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  border: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
}

.search-cancel:active {
  background: #e8e8ed;
  color: var(--accent);
}

.search-page-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}

.search-block {
  margin-bottom: 26px;
}

.search-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.search-block-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.search-clear {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  border-radius: 10px;
}

.search-clear svg {
  width: 18px;
  height: 18px;
}

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.search-chip.hot {
  background: #fff1f2;
  color: #be123c;
}

.search-empty {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}
