:root {
  --bg: #f4f0ea;
  --bg-deep: #ebe4db;
  --ink: #1c1713;
  --muted: #6f6459;
  --line: rgba(28, 23, 19, 0.12);
  --line-strong: rgba(28, 23, 19, 0.2);
  --card: #fffdf9;
  --accent: #2f5d4a;
  --accent-soft: rgba(47, 93, 74, 0.1);
  --warm: #b85c38;
  --shadow: 0 18px 50px rgba(28, 23, 19, 0.12);
  --radius: 22px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-ui: "SF Pro Text", "Segoe UI", "Helvetica Neue", Helvetica, system-ui, -apple-system, sans-serif;
  --font-display: "SF Pro Display", "Segoe UI", "Helvetica Neue", Helvetica, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(184, 92, 56, 0.12), transparent 34%),
    radial-gradient(circle at top right, rgba(47, 93, 74, 0.12), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

em, i, .italic {
  font-style: normal !important;
}

body {
  min-height: 100dvh;
}

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

.app {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: calc(18px + var(--safe-top)) 18px calc(28px + var(--safe-bottom));
  display: grid;
  gap: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 20px rgba(28, 23, 19, 0.08);
}

.brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.brand span,
.ver,
.hint,
.lead,
.field > span,
.photo-sub {
  color: var(--muted);
}

.ver {
  font-size: 0.85rem;
}

.layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  align-items: start;
}

.card-wrap,
.form-panel {
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.card-wrap {
  padding: 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111;
  isolation: isolate;
}

.hero > img#hero-img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 320px;
  max-height: 70vh;
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 10, 8, 0.18) 0%, rgba(12, 10, 8, 0.08) 36%, rgba(12, 10, 8, 0.78) 100%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 28%);
  pointer-events: none;
}

.hero-top,
.hero-copy {
  position: absolute;
  left: 22px;
  right: 22px;
  z-index: 2;
  color: #fff;
}

.hero-top {
  top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.hero-top #hero-day {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero-top #hero-date {
  opacity: 0.92;
  font-family: var(--font-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.hero-copy {
  bottom: 22px;
  padding-right: 150px;
}

.kicker {
  margin-bottom: 8px;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.86;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 8.4vw, 5.5rem);
  font-weight: 700;
  font-style: normal;
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.hero-copy h1 span {
  margin-left: 0.18em;
  font-size: 0.34em;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 0.55em;
  opacity: 0.9;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  max-width: calc(100% - 4px);
}

.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.chip b {
  font-family: var(--font-display);
  font-size: 1.1em;
  font-weight: 700;
  font-style: normal;
}

.chip small {
  opacity: 0.82;
  font-size: 0.82em;
}

.club-logo {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 130px;
  height: 130px;
  object-fit: contain;
  z-index: 3;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

.share-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.hint {
  margin-top: 10px;
  font-size: 0.9rem;
  text-align: center;
}

.hint.is-error { color: #9a3b2f; }
.hint.is-ok { color: var(--accent); }

.form-panel {
  padding: 22px 22px 24px;
}

.form-panel h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.03em;
}

.date-field {
  position: relative;
}

.date-field input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 48px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  outline: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.date-field input[type="text"]:focus {
  border-color: rgba(47, 93, 74, 0.45);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.date-picker {
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
  background: transparent;
}

.date-field::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  pointer-events: none;
  background:
    linear-gradient(var(--muted), var(--muted)) center 3px / 10px 1.5px no-repeat,
    linear-gradient(var(--muted), var(--muted)) center 7px / 10px 1.5px no-repeat,
    linear-gradient(var(--muted), var(--muted)) center 11px / 10px 1.5px no-repeat;
  border: 1.5px solid var(--muted);
  border-radius: 3px;
  box-sizing: border-box;
  opacity: 0.7;
}

.lead {
  margin: 6px 0 18px;
  max-width: 34ch;
}

form {
  display: grid;
  gap: 14px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field > span,
.photo-title {
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  border-color: rgba(47, 93, 74, 0.45);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field input[readonly] {
  background: rgba(47, 93, 74, 0.06);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.02em;
}

.photo-field {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1.5px dashed rgba(28, 23, 19, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.42));
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.photo-field:hover,
.photo-field:focus-within {
  border-color: rgba(47, 93, 74, 0.45);
  background: rgba(47, 93, 74, 0.05);
}

.photo-title {
  color: var(--ink);
  font-weight: 600;
}

.photo-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.form-actions,
.share-row {
  display: grid;
  gap: 10px;
}

.form-actions {
  grid-template-columns: 0.8fr 1.2fr;
  margin-top: 4px;
}

.btn {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

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

.btn.primary {
  background: var(--ink);
  color: #fffaf4;
}

.btn.primary:hover { background: #2a221c; }

.btn.ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

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

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .hero > img#hero-img {
    min-height: 360px;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .card-wrap,
  .form-panel {
    border-radius: 24px;
  }

  .card-wrap { padding: 10px; }
  .form-panel { padding: 18px 16px 20px; }

  .field-row,
  .share-row,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .hero-top,
  .hero-copy {
    left: 16px;
    right: 16px;
  }

  .hero-copy h1 {
    font-size: clamp(3rem, 14vw, 3.8rem);
  }

  .hero-copy {
    padding-right: 112px;
  }

  .club-logo {
    width: 97px;
    height: 97px;
    right: 10px;
    bottom: 10px;
  }

  .chip {
    padding: 8px 11px;
    font-size: 0.9rem;
  }
}


@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
