/* RestaurantPlatformPreview — high-fidelity restaurant platform store detail simulator */
:root {
  --rpp-page: #F5F5F5;
  --rpp-card: #FFFFFF;
  --rpp-text: #111111;
  --rpp-sub: #777777;
  --rpp-weak: #999999;
  --rpp-orange: #FF6B35;
  --rpp-orange-dark: #F05222;
  --rpp-orange-bg: #FFF3EB;
  --rpp-line: #EEEEEE;
  --rpp-mint: #12B981;
}

.restaurant-platform-preview,
.rpp-shell {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
.restaurant-platform-preview *,
.restaurant-platform-preview *::before,
.restaurant-platform-preview *::after,
.rpp-shell *,
.rpp-shell *::before,
.rpp-shell *::after { box-sizing: border-box; }

.rpp-shell {
  width: 100%;
  border-radius: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  color: #0f172a;
}
.rpp-shell.is-embedded { min-height: 100%; }
.rpp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.rpp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0e9f76;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.rpp-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rpp-mint); box-shadow: 0 0 0 6px rgba(18,185,129,.10); }
.rpp-title { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 900; color: #0f172a; }
.rpp-desc { margin: 7px 0 0; max-width: 640px; color: #64748b; font-size: 13px; line-height: 1.6; }
.rpp-result-inline-btn,
.rpp-mobile-toggle {
  min-height: 40px;
  border: 1px solid rgba(18,185,129,.22);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(221,248,242,.86);
  color: #0e9f76;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.84), 0 10px 24px rgba(14,159,118,.10);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.rpp-result-inline-btn:hover,
.rpp-mobile-toggle:hover { background: rgba(187,247,208,.92); transform: translateY(-1px); }
.rpp-mobile-toggle { display: none; width: 100%; margin-bottom: 14px; }
.rpp-body { display: grid; grid-template-columns: minmax(320px, 55%) minmax(340px, 45%); gap: 18px; align-items: start; }
.rpp-editor-card,
.rpp-preview-card {
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(226,232,240,.88);
  box-shadow: 0 14px 40px rgba(15,23,42,.07), inset 0 1px 0 rgba(255,255,255,.90);
}
.rpp-editor-card { padding: 16px; }
.rpp-editor-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.rpp-editor-head h3 { margin: 0; font-size: 16px; font-weight: 900; color: #111827; }
.rpp-editor-head span { color: #94a3b8; font-size: 12px; font-weight: 700; }
.rpp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rpp-field { display: flex; flex-direction: column; gap: 5px; }
.rpp-field.rpp-span-2 { grid-column: 1 / -1; }
.rpp-field label { color: #475569; font-size: 12px; font-weight: 850; }
.rpp-field input,
.rpp-field textarea {
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(203,213,225,.86);
  background: rgba(255,255,255,.92);
  color: #0f172a;
  padding: 8px 10px;
  outline: none;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.rpp-field textarea { min-height: 68px; resize: vertical; line-height: 1.45; }
.rpp-field input:focus,
.rpp-field textarea:focus { border-color: rgba(255,107,53,.54); box-shadow: 0 0 0 4px rgba(255,107,53,.10), inset 0 1px 0 rgba(255,255,255,.92); }
.rpp-section-label { grid-column: 1 / -1; margin: 6px 0 -2px; color: #0f172a; font-size: 13px; font-weight: 950; }

.rpp-preview-card { padding: 16px; position: sticky; top: 18px; }
.rpp-phone-frame {
  width: min(390px, 100%);
  margin: 0 auto;
  border-radius: 30px;
  padding: 8px;
  background: linear-gradient(145deg, rgba(17,24,39,.14), rgba(255,255,255,.86));
  box-shadow: 0 24px 48px rgba(15,23,42,.16), inset 0 0 0 1px rgba(15,23,42,.06);
}
.rpp-phone {
  width: 100%;
  height: 740px;
  max-height: min(78vh, 760px);
  overflow-y: auto;
  border-radius: 24px;
  background: var(--rpp-page);
  color: var(--rpp-text);
  position: relative;
  scrollbar-width: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
}
.rpp-phone::-webkit-scrollbar { display: none; }
.rpp-phone-inner { min-height: 100%; padding-bottom: 72px; position: relative; }

.rpp-statusbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 34px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,0));
  pointer-events: none;
}
.rpp-status-icons { display: flex; align-items: center; gap: 6px; }
.rpp-signal { display: inline-flex; gap: 2px; align-items: end; height: 12px; }
.rpp-signal i { display: block; width: 3px; border-radius: 2px; background: currentColor; }
.rpp-signal i:nth-child(1) { height: 4px; opacity: .70; }
.rpp-signal i:nth-child(2) { height: 7px; opacity: .82; }
.rpp-signal i:nth-child(3) { height: 10px; }
.rpp-wifi { width: 15px; height: 10px; border: 2px solid transparent; border-top-color: currentColor; border-radius: 999px 999px 0 0; position: relative; transform: translateY(3px); }
.rpp-wifi::after { content: ""; position: absolute; left: 50%; bottom: -2px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; transform: translateX(-50%); }
.rpp-battery { width: 20px; height: 10px; border: 1.6px solid currentColor; border-radius: 3px; position: relative; }
.rpp-battery::before { content: ""; position: absolute; right: -3.5px; top: 2.2px; width: 2px; height: 4px; border-radius: 0 2px 2px 0; background: currentColor; }
.rpp-battery::after { content: ""; position: absolute; left: 2px; top: 2px; height: 4px; width: 13px; border-radius: 2px; background: currentColor; }

.rpp-hero { margin-top: -34px; position: relative; height: 210px; background: #ddd; overflow: hidden; }
.rpp-top-actions { position: absolute; left: 10px; right: 10px; top: 38px; z-index: 10; display: flex; justify-content: space-between; align-items: center; }
.rpp-action-group { display: flex; gap: 8px; }
.rpp-round-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,.42);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform .15s ease, background .15s ease;
}
.rpp-round-btn:hover { background: rgba(0,0,0,.56); transform: translateY(-1px); }
.rpp-round-btn:active { transform: translateY(0) scale(.96); }
.rpp-round-btn svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rpp-hero-track {
  height: 100%;
  display: flex;
  gap: 6px;
  padding: 58px 10px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 10px;
  background: #fff;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}
.rpp-hero-track::-webkit-scrollbar { display: none; }
.rpp-hero-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.rpp-hero-img { position: relative; flex: 0 0 73%; aspect-ratio: 4 / 3; height: auto; min-width: 0; overflow: hidden; border-radius: 13px; background: #e5e7eb; scroll-snap-align: start; box-shadow: 0 8px 18px rgba(15,23,42,.16); }
.rpp-hero-img:first-child { margin-left: 0; }
.rpp-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.rpp-hero-badges { position: absolute; right: 7px; bottom: 8px; display: flex; flex-direction: column; gap: 5px; }
.rpp-hero-badge { padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 800; backdrop-filter: blur(8px); }
.rpp-hero-index { position: absolute; left: 7px; bottom: 8px; padding: 3px 7px; border-radius: 999px; background: rgba(0,0,0,.50); color: #fff; font-size: 11px; font-weight: 850; backdrop-filter: blur(8px); }

.rpp-info-card { margin: -18px 10px 0; position: relative; z-index: 5; border-radius: 20px 20px 14px 14px; background: var(--rpp-card); padding: 17px 14px 12px; box-shadow: 0 -2px 0 rgba(255,255,255,.9), 0 8px 18px rgba(0,0,0,.05); }
.rpp-store-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rpp-store-title { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 950; color: #111; letter-spacing: -.02em; }
.rpp-chain-label { flex: 0 0 auto; padding: 3px 6px; border-radius: 5px; background: #f2f2f2; color: #666; font-size: 11px; font-weight: 800; }
.rpp-rating-row { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--rpp-sub); font-size: 12px; font-weight: 750; }
.rpp-stars { color: #FF9E1B; letter-spacing: -1px; font-size: 13px; }
.rpp-rating-num { color: #111; font-weight: 900; }
.rpp-score-row { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 8px; color: #666; font-size: 12px; }
.rpp-tag-row { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rpp-soft-tag { display: inline-flex; align-items: center; border-radius: 6px; padding: 3px 6px; background: var(--rpp-orange-bg); color: #D94B20; font-size: 11px; font-weight: 850; }
.rpp-ranking { color: #333; font-size: 12px; font-weight: 800; }

.rpp-block { margin: 8px 10px 0; border-radius: 14px; background: var(--rpp-card); overflow: hidden; }
.rpp-row { padding: 12px 12px; border-bottom: 1px solid var(--rpp-line); }
.rpp-row:last-child { border-bottom: none; }
.rpp-biz-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rpp-biz-main { color: #111; font-size: 13px; font-weight: 900; }
.rpp-biz-main .is-open { color: #00A76F; margin-right: 6px; }
.rpp-detail-link { color: var(--rpp-weak); font-size: 12px; font-weight: 750; }
.rpp-service-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.rpp-service-tags span { padding: 3px 6px; border-radius: 5px; background: #F7F7F7; color: #666; font-size: 11px; font-weight: 750; }
.rpp-address-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.rpp-address { color: #111; font-size: 13px; font-weight: 900; margin-bottom: 5px; }
.rpp-distance { color: var(--rpp-sub); font-size: 12px; line-height: 1.35; }
.rpp-address-actions { display: flex; gap: 8px; }
.rpp-square-action { width: 46px; height: 46px; border-radius: 13px; border: 1px solid var(--rpp-line); background: #fff; color: #333; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 850; cursor: pointer; }
.rpp-square-action:hover { background: #fafafa; }
.rpp-square-action svg { width: 17px; height: 17px; stroke: #333; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.rpp-service-entry { display: grid; grid-template-columns: repeat(3, 1fr) auto; align-items: stretch; min-height: 48px; }
.rpp-service-entry button { border: none; background: #fff; color: #333; font-size: 13px; font-weight: 900; cursor: pointer; border-right: 1px solid var(--rpp-line); }
.rpp-service-entry button.is-active { color: var(--rpp-orange); background: linear-gradient(180deg, #fff, #fff8f4); }
.rpp-service-entry span { display: flex; align-items: center; padding: 0 10px; color: var(--rpp-weak); font-size: 11px; white-space: nowrap; }
.rpp-tabs { position: sticky; top: 34px; z-index: 20; height: 48px; display: flex; align-items: center; background: var(--rpp-card); border-bottom: 1px solid var(--rpp-line); margin-top: 8px; }
.rpp-tab { flex: 1; height: 48px; border: none; background: #fff; color: #333; font-size: 14px; font-weight: 900; cursor: pointer; position: relative; }
.rpp-tab.is-active { color: #111; }
.rpp-tab.is-active::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 26px; height: 3px; border-radius: 99px; background: var(--rpp-orange); transform: translateX(-50%); }

.rpp-content-section { margin: 8px 10px 0; }
.rpp-coupon-card,
.rpp-package-section { border-radius: 14px; background: var(--rpp-card); padding: 12px; }
.rpp-coupon-inner { border: 1px solid rgba(255,107,53,.24); background: linear-gradient(135deg, #fff, var(--rpp-orange-bg)); border-radius: 13px; padding: 12px; }
.rpp-coupon-title { color: #111; font-size: 14px; font-weight: 950; margin-bottom: 6px; }
.rpp-coupon-subtitle { color: var(--rpp-sub); font-size: 11px; line-height: 1.45; margin-bottom: 10px; }
.rpp-coupon-bottom { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.rpp-price-line { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.rpp-price { color: var(--rpp-orange); font-size: 23px; line-height: 1; font-weight: 950; }
.rpp-discount { color: var(--rpp-orange); background: #fff; border: 1px solid rgba(255,107,53,.25); padding: 2px 5px; border-radius: 5px; font-size: 11px; font-weight: 850; }
.rpp-sold { margin-top: 5px; color: var(--rpp-weak); font-size: 11px; }
.rpp-buy-btn { min-width: 72px; height: 34px; border: none; border-radius: 999px; background: linear-gradient(135deg, #FF7A3D, #FF4F22); color: #fff; font-size: 14px; font-weight: 950; cursor: pointer; box-shadow: 0 8px 16px rgba(255,107,53,.26); }
.rpp-buy-btn:active { transform: scale(.97); }
.rpp-more-coupon { text-align: center; color: var(--rpp-sub); font-size: 12px; font-weight: 850; padding-top: 10px; cursor: pointer; }
.rpp-package-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rpp-package-title { font-size: 17px; font-weight: 950; color: #111; }
.rpp-refund-tags { display: flex; gap: 6px; }
.rpp-refund-tags span { color: #D94B20; background: var(--rpp-orange-bg); padding: 3px 5px; border-radius: 5px; font-size: 11px; font-weight: 850; }
.rpp-package-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rpp-package-card { border-radius: 13px; overflow: hidden; border: 1px solid #F0F0F0; background: #fff; }
.rpp-package-img { position: relative; height: 98px; background: #eee; overflow: hidden; }
.rpp-package-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rpp-package-tag { position: absolute; left: 6px; top: 6px; border-radius: 5px; padding: 2px 5px; background: rgba(255,107,53,.94); color: #fff; font-size: 10px; font-weight: 850; }
.rpp-package-body { padding: 8px; }
.rpp-package-name { color: #111; font-size: 13px; line-height: 1.35; height: 35px; font-weight: 900; overflow: hidden; }
.rpp-package-meta { color: var(--rpp-sub); font-size: 11px; margin-top: 5px; }
.rpp-package-foot { margin-top: 7px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rpp-package-price { color: var(--rpp-orange); font-size: 16px; font-weight: 950; }
.rpp-package-detail { border: 1px solid rgba(255,107,53,.28); color: var(--rpp-orange); background: #fff; border-radius: 999px; height: 25px; padding: 0 8px; font-size: 11px; font-weight: 900; cursor: pointer; }

.rpp-bottom-actions { position: sticky; bottom: 0; z-index: 30; height: 58px; border-top: 1px solid var(--rpp-line); background: rgba(255,255,255,.94); display: grid; grid-template-columns: repeat(3, 1fr); backdrop-filter: blur(12px); }
.rpp-bottom-actions button { border: none; background: transparent; color: #444; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 850; cursor: pointer; transition: color .15s ease, background .15s ease; }
.rpp-bottom-actions button:hover { color: var(--rpp-orange); background: #fff8f4; }
.rpp-bottom-actions button:active { transform: scale(.98); }
.rpp-bottom-actions svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1180px) {
  .rpp-body { grid-template-columns: 1fr; }
  .rpp-preview-card { position: static; }
  .rpp-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .rpp-shell { padding: 14px; border-radius: 22px; }
  .rpp-header { flex-direction: column; }
  .rpp-result-inline-btn { width: 100%; }
  .rpp-mobile-toggle { display: block; }
  .rpp-body { display: none; }
  .rpp-shell.rpp-mobile-open .rpp-body { display: grid; }
  .rpp-form-grid { grid-template-columns: 1fr; }
  .rpp-field.rpp-span-2 { grid-column: auto; }
  .rpp-editor-card { order: 2; }
  .rpp-preview-card { order: 1; padding: 10px; border-radius: 18px; }
  .rpp-phone-frame { width: min(390px, 100%); padding: 5px; border-radius: 24px; }
  .rpp-phone { height: 720px; max-height: none; border-radius: 20px; }
}
@media (max-width: 420px) {
  .rpp-shell { margin-left: -4px; margin-right: -4px; }
  .rpp-phone { height: 700px; }
  .rpp-hero { height: 162px; }
  .rpp-store-title { font-size: 17px; }
  .rpp-service-entry { grid-template-columns: repeat(3, 1fr); }
  .rpp-service-entry span { grid-column: 1 / -1; min-height: 28px; justify-content: center; border-top: 1px solid var(--rpp-line); }
}
@media (prefers-reduced-motion: reduce) {
  .restaurant-platform-preview *, .rpp-shell * { transition: none !important; scroll-behavior: auto !important; }
}
