:root {
  --bg: #FFF6F2;
  --card: #FFFFFF;
  --ink: #5A4A45;
  --soft: #8A7A74;
  --rose: #D98AA6;
  --rose-deep: #C7637E;
  --gold: #E0A35E;
  --line: #F0E2DC;
  --shadow: 0 8px 26px rgba(170, 120, 110, 0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  background: linear-gradient(160deg, #FFF0F3 0%, #FFF6F2 45%, #FBF3EC 100%);
  color: var(--ink); line-height: 1.7; -webkit-font-smoothing: antialiased; min-height: 100vh;
}
.hidden { display: none !important; }

/* header */
.site-header {
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
.header-inner {
  max-width: 720px; margin: 0 auto; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex-wrap: nowrap;
}
.brand {
  font-weight: 800; color: var(--rose-deep); font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1;
}
.auth-area { flex: 0 0 auto; }
.btn-login {
  background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff;
  border: none; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 12px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.user-area { display: inline-flex; align-items: center; gap: 6px; }
.user-name {
  color: var(--ink); font-weight: 600; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 84px;
}
.btn-logout {
  background: #fff; color: var(--soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 10px; font-size: 11px; cursor: pointer;
  font-family: inherit; white-space: nowrap; flex: 0 0 auto;
}

/* main */
.wrap { max-width: 720px; margin: 0 auto; padding: 24px 18px 48px; }
.lead { text-align: center; font-size: 15px; color: var(--ink); margin-bottom: 24px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.thumb { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #FCEEF0; display: block; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 16px; font-weight: 800; color: var(--rose-deep); }
.card-desc { font-size: 13px; color: var(--ink); flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; }
.price { font-weight: 800; font-size: 15px; }
.price-free { color: var(--gold); }
.price-paid { color: var(--rose-deep); }
.badge { background: #EAF7EF; color: #3F9D6B; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }

.btn {
  display: block; text-align: center; border: none; border-radius: 999px;
  padding: 12px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
  text-decoration: none; margin-top: 4px;
}
.btn-open { background: #fff; color: var(--rose-deep); border: 2px solid var(--rose); }
.btn-buy { background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff; }

.feedback { text-align: center; margin-top: 32px; font-size: 13px; color: var(--soft); }
.feedback p { margin-bottom: 10px; }
.feedback a { color: var(--rose-deep); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--rose); padding-bottom: 2px; }

.site-footer { text-align: center; font-size: 12px; color: var(--soft); margin: 28px 0; }
.site-footer a { color: var(--rose-deep); text-decoration: none; font-weight: 700; }
