:root {
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
  color: #29241f;
  background: #f7f4ed;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea { font: inherit; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1rem, calc((100vw - 1100px) / 2));
  color: white;
  background: #17120f;
}

.brand { display: flex; align-items: center; gap: .65rem; color: white; text-decoration: none; font-size: 1.2rem; font-weight: 800; }
.brand img { width: 42px; height: 42px; border: 2px solid #f7ead5; border-radius: 50%; background: #f7ead5; }
nav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.nav-button { color: white; background: transparent; border: 0; cursor: pointer; }
.nav-link { padding: .15rem .35rem; text-decoration: none; }
.signed-in-user { color: #e8d8c8; font-size: .85rem; }

main { width: min(1100px, calc(100% - 2rem)); margin: 2rem auto; min-height: 70vh; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .55fr); align-items: center; gap: 1rem; overflow: hidden; padding: clamp(2rem, 6vw, 4.5rem); color: white; border-radius: 1.25rem; background: radial-gradient(circle at 82% 45%, #8b5b37 0, #69421c 26%, #17120f 72%); }
.hero-copy { position: relative; z-index: 1; }
.hero h1 { margin: .25rem 0; font-size: clamp(3rem, 8vw, 5rem); }
.hero p { max-width: 650px; font-size: 1.15rem; }
.hero-mascot { width: min(390px, 130%); margin: -4rem -3rem -5rem auto; filter: drop-shadow(0 22px 24px rgba(0, 0, 0, .35)); }
.eyebrow { text-transform: uppercase; font-weight: 800; letter-spacing: .08em; }

.button { border: 0; border-radius: .5rem; padding: .7rem 1rem; cursor: pointer; font-weight: 700; }
.primary { color: #17120f; background: #ffc107; }
.secondary { color: white; background: #6b4b2d; }
.danger { color: white; background: #9e2a2b; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.card, .order-card { padding: 1.25rem; border-radius: 1rem; background: white; box-shadow: 0 .25rem 1rem rgba(0, 0, 0, .08); }
.card h3 { margin-bottom: .25rem; }
.badge { display: inline-block; padding: .25rem .5rem; border-radius: 1rem; background: #ffc107; font-size: .8rem; font-weight: 700; }
.meta { display: flex; justify-content: space-between; margin: 1rem 0; }
.cart-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid #ddd; }

form { display: grid; gap: 1rem; max-width: 650px; }
label { display: grid; gap: .4rem; font-weight: 700; }
input, textarea { padding: .7rem; border: 1px solid #aaa; border-radius: .4rem; }
.check { display: flex; align-items: center; }
.check input { width: auto; }

.message, .notice { padding: 1rem; border-radius: .5rem; }
.message { color: #fff; background: #275d38; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice { background: #fff3cd; }
.muted { color: #6c625a; }
.profile-grid { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: .75rem 1.25rem; margin: 0; }
.profile-grid dt { font-weight: 800; }
.profile-grid dd { margin: 0; overflow-wrap: anywhere; }
.passkey-layout { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr); gap: 1rem; align-items: start; }
.passkey-layout .card { display: grid; gap: 1rem; }
.passkey-layout h3, .passkey-layout p { margin: 0; }
.passkey-list-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.passkey-list { display: grid; gap: .75rem; }
.passkey-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1rem; border: 1px solid #ded5ca; border-radius: .75rem; }
.passkey-item h4 { margin: 0 0 .35rem; }
.passkey-item p { font-size: .9rem; overflow-wrap: anywhere; }
.debug-panel { display: grid; gap: .5rem; }
.debug-panel h3 { margin: 1rem 0 0; }
.native-auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .85fr); gap: 2rem; align-items: center; }
.native-auth-layout h2 { margin: .25rem 0; font-size: clamp(2.5rem, 5vw, 4rem); }
.native-auth-mascot { display: block; width: min(320px, 75%); margin: 1rem auto -1rem; }
.native-auth-card { min-height: 390px; }
.native-auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1.5rem; }
.native-auth-tab { padding: .7rem; border: 0; border-bottom: 3px solid transparent; color: #6c625a; background: transparent; cursor: pointer; font-weight: 800; }
.native-auth-tab.active { border-color: #ffc107; color: #17120f; }
.native-auth-form { display: grid; gap: 1rem; }
.native-auth-form h3 { margin: 0; font-size: 1.6rem; }
.native-auth-form p { margin: 0; }
.native-auth-error { margin-top: 1rem; padding: 1rem; border: 1px solid #d8a0a1; border-radius: .75rem; color: #631c1d; background: #fff1f1; overflow-wrap: anywhere; }
.native-auth-error-heading { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; }
.native-auth-error-heading h4 { margin: 0 0 .25rem; font-size: 1.05rem; }
.native-auth-error-heading p { margin: 0; }
.native-auth-error-icon { display: grid; width: 1.7rem; height: 1.7rem; border-radius: 50%; place-items: center; color: #fff; background: #9e2a2b; font-weight: 900; }
.native-auth-error-details { margin-top: .9rem; padding-top: .75rem; border-top: 1px solid #e7c5c5; }
.native-auth-error-details summary { cursor: pointer; color: #631c1d; font-weight: 800; }
.native-auth-error-details pre { max-height: 18rem; margin-top: .75rem; font-size: .78rem; }
.native-auth-success { padding: 1rem; border-radius: .75rem; background: #e8f4ea; }
.native-code-content { display: grid; gap: 1rem; margin: 1.5rem 0; }
.native-code-file summary { cursor: pointer; font-weight: 800; }
.native-code-file summary code { margin-left: .5rem; color: #6c625a; font-weight: 400; }
.native-code-file pre { max-height: 65vh; margin-top: 1rem; }
pre { max-width: 100%; margin: 0; padding: 1rem; overflow: auto; border-radius: .5rem; color: #f8f4ed; background: #17120f; white-space: pre-wrap; overflow-wrap: anywhere; }
.hidden { display: none !important; }
footer { padding: 2rem; text-align: center; color: #6c625a; }

@media (max-width: 700px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .hero { grid-template-columns: 1fr; }
  .native-auth-layout { grid-template-columns: 1fr; }
  .hero-mascot { width: min(320px, 90%); margin: -1rem auto -5rem; }
  .cart-row { grid-template-columns: 1fr auto; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-grid dd { margin-bottom: .5rem; }
  .passkey-layout { grid-template-columns: 1fr; }
  .passkey-list-heading, .passkey-item { align-items: stretch; grid-template-columns: 1fr; }
}
