:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #171b22;
  --muted: #7d8590;
  --line: #eceff3;
  --accent: #ef432f;
  --accent-soft: #fff1ee;
  --blue: #4c90dd;
  --green: #1fa54a;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
}

.topbar {
  height: 76px;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: end;
  padding: 0 18px 14px;
  background: #fff;
}

.page-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
}

.icon-button {
  color: #101216;
  font-size: 28px;
  line-height: 1;
}

.hero {
  position: relative;
  height: 232px;
  padding: 18px 18px 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.4)),
    url("/assets/stadium-header.jpg") center / cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08),
    rgba(229, 244, 251, 0.7)
  );
}

.hero-content,
.hero-actions {
  position: relative;
  z-index: 1;
}

.hero-content {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 8px;
}

.hero h1 {
  margin: 0;
  font-size: 20px;
}

.hero p {
  margin: 7px 0 0;
  color: #34495e;
  font-size: 15px;
}

.follow-button {
  min-width: 78px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: #4a4f57;
  background: rgba(255, 255, 255, 0.84);
}

.login-button {
  position: absolute;
  top: 80px;
  right: 18px;
  z-index: 1;
  min-width: 88px;
  height: 36px;
  padding: 0 14px;
  color: #fff;
  border-radius: 999px;
  background: #18ad55;
}

.hero-actions {
  position: absolute;
  right: 18px;
  bottom: 14px;
  left: 18px;
  height: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
}

.hero-actions button {
  min-width: 0;
  height: 28px;
  color: #46505c;
  font-size: 15px;
  border-right: 1px solid #d8dde4;
}

.hero-actions button:last-child {
  border-right: 0;
  color: var(--green);
}

.content {
  padding: 0 14px 92px;
}

.tabs {
  height: 58px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: #fff;
}

.tabs button {
  position: relative;
  color: #676d76;
  font-size: 18px;
}

.tabs button.active::after {
  position: absolute;
  right: 34px;
  bottom: 0;
  left: 34px;
  height: 3px;
  content: "";
  background: var(--accent);
}

.search-box {
  height: 42px;
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: center;
  margin: 12px 0 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f3;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  text-align: center;
  color: #626873;
  background: transparent;
}

.search-box span {
  display: grid;
  height: 100%;
  place-items: center;
  color: #fff;
  font-size: 26px;
  background: var(--blue);
}

.post-list {
  display: grid;
  gap: 10px;
}

.plan-list {
  display: grid;
  gap: 10px;
}

.post-card {
  min-height: 110px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 16px 14px;
  text-align: left;
  border-radius: 8px;
  background: #fff;
}

.post-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.post-card p {
  margin: 0;
  color: #33475b;
  font-size: 16px;
}

.post-meta {
  align-self: end;
  margin-top: 16px;
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

.post-price {
  align-self: end;
  color: #ef4b14;
  font-weight: 700;
  font-size: 18px;
}

.post-hit {
  align-self: end;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #d52a2a;
  border: 1px solid #d52a2a;
  border-radius: 999px;
  font-size: 26px;
  transform: rotate(-12deg);
}

.detail-view {
  min-height: calc(100vh - 76px);
  padding-bottom: 126px;
  background: #fff;
}

.detail-header {
  min-height: 98px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.detail-header p,
.detail-header h2 {
  margin: 0;
}

.detail-header p {
  margin-bottom: 8px;
  font-size: 20px;
}

.detail-header h2 {
  color: #304255;
  font-size: 18px;
  font-weight: 500;
}

.stamp {
  width: 64px;
  height: 64px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #d52a2a;
  border: 1px solid #d52a2a;
  border-radius: 50%;
  font-size: 28px;
  transform: rotate(-12deg);
}

.detail-tab {
  width: 88px;
  margin-top: 18px;
  padding: 10px 14px;
  color: #fff;
  font-weight: 700;
  border-radius: 0 999px 999px 0;
  background: var(--accent);
}

.published {
  padding: 16px 14px 0;
  color: var(--muted);
}

.locked-card {
  width: calc(100% - 68px);
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 32px auto 0;
  color: #9b8667;
  border: 1px dashed #9b8667;
  border-radius: 6px;
}

.locked-card strong {
  color: #e0aa25;
}

.article-body {
  padding: 24px 18px;
  line-height: 1.8;
}

.article-body h3 {
  margin-top: 0;
}

.floating-actions {
  position: fixed;
  right: max(calc((100vw - 430px) / 2 + 12px), 12px);
  bottom: 144px;
  display: grid;
  gap: 10px;
}

.floating-actions button {
  width: 62px;
  height: 62px;
  color: #fff;
  border-radius: 999px;
  background: #db2d1c;
}

.floating-actions button:first-child {
  color: #6f757d;
  border: 1px solid var(--line);
  background: #fff;
}

.floating-actions small {
  display: block;
}

.wallet-view {
  min-height: calc(100vh - 308px);
  padding: 18px 14px 92px;
}

.info-view {
  min-height: calc(100vh - 308px);
  padding: 18px 14px 92px;
}

.info-card {
  padding: 16px;
  border-radius: 8px;
  background: #fff;
}

.info-card h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.record-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.record-grid strong {
  display: block;
  font-size: 24px;
}

.record-grid span,
.record-list span,
.official-list span,
.profile-meta span {
  color: var(--muted);
  font-size: 13px;
}

.record-list,
.official-list {
  display: grid;
  gap: 10px;
}

.record-row,
.official-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.profile-code {
  min-height: 170px;
  display: grid;
  place-items: center;
  margin: 12px 0;
  border-radius: 8px;
  color: #fff;
  font-size: 42px;
  background: #18202a;
}

.profile-meta {
  display: grid;
  gap: 6px;
}

.plan-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 8px;
  background: #fff;
}

.plan-card h2,
.plan-card p {
  margin: 0;
}

.plan-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plan-card strong {
  color: #ef4b14;
}

.plan-card button {
  height: 36px;
  padding: 0 14px;
  color: #fff;
  border-radius: 999px;
  background: var(--accent);
}

.wallet-summary {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #ef432f, #ff7e32);
}

.wallet-summary span {
  font-size: 14px;
}

.wallet-summary strong {
  font-size: 30px;
}

.wallet-panel {
  margin-top: 14px;
  padding: 16px;
  border-radius: 8px;
  background: #fff;
}

.wallet-panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.wallet-panel p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.purchase-bar {
  position: fixed;
  right: 0;
  bottom: 58px;
  left: 0;
  width: min(100%, 430px);
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.purchase-bar span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.purchase-bar strong {
  font-size: 16px;
}

.purchase-bar button {
  min-width: 154px;
  height: 44px;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  background: var(--accent);
}

.tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 430px);
  height: 58px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  background: #fff;
}

.tabbar button {
  display: grid;
  place-items: center;
  color: #8b9198;
  font-size: 22px;
}

.tabbar span {
  font-size: 12px;
}

.tabbar button.active {
  color: var(--accent);
}


.toast {
  position: fixed;
  right: 50%;
  bottom: 136px;
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  color: #fff;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  opacity: 0;
  pointer-events: none;
  transform: translateX(50%) translateY(12px);
  transition: 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(50%) translateY(0);
}

.hidden {
  display: none;
}

.contact-dialog {
  width: calc(100% - 32px);
  max-width: 320px;
  padding: 18px;
  border: 0;
  border-radius: 10px;
}

.contact-dialog::backdrop {
  background: rgba(0, 0, 0, 0.34);
}

.contact-dialog h2 {
  margin: 0 0 12px;
}

.contact-dialog p {
  margin: 0 0 8px;
}

.dialog-close {
  position: absolute;
  top: 8px;
  right: 10px;
  color: #7d8590;
  font-size: 24px;
}

@media (max-width: 360px) {
  .hero-actions button {
    font-size: 13px;
  }

  .post-card h2 {
    font-size: 18px;
  }
}
