:root {
  color-scheme: light;
  --bg: #eef2f0;
  --panel: #ffffff;
  --ink: #14211b;
  --muted: #66746d;
  --line: #d9e1dd;
  --green: #176b45;
  --green-dark: #0f4e32;
  --blue: #2457c5;
  --blue-dark: #173f91;
  --amber: #a05a00;
  --red: #b42318;
  --shadow: 0 18px 44px rgba(24, 43, 34, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(23, 107, 69, 0.12), rgba(36, 87, 197, 0.08)),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.shell {
  display: grid;
  min-height: 100vh;
  padding: 32px 16px;
  place-items: start center;
}

.lookup {
  width: min(100%, 760px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 36px);
}

.page-header {
  margin-bottom: 28px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1;
}

h2 {
  font-size: 1.25rem;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  outline: none;
  padding: 0 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(23, 107, 69, 0.16);
}

.search-box {
  position: relative;
  margin: 0;
}

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(20, 33, 27, 0.14);
}

.suggestion {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  gap: 16px;
  padding: 10px 14px;
  text-align: left;
}

.suggestion:last-child {
  border-bottom: 0;
}

.suggestion:hover,
.suggestion:focus {
  background: #f4f8f6;
  outline: none;
}

.suggestion strong {
  display: block;
}

.suggestion span {
  color: var(--muted);
  font-size: 0.85rem;
}

.result-panel {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.hidden {
  display: none;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.foursome-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.foursome-list li {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  gap: 12px;
  padding: 10px 12px;
}

.player-name {
  font-weight: 750;
}

.player-meta {
  color: var(--muted);
  font-size: 0.88rem;
  text-align: right;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.details-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
  padding: 14px;
}

dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 6px 0 0;
  font-size: 1.25rem;
  font-weight: 850;
}

.action-row {
  margin: 18px 0;
}

.send-form {
  margin: 22px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.inline-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  padding: 0 16px;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.primary {
  background: var(--blue);
  color: #fff;
}

.primary:hover {
  background: var(--blue-dark);
}

.success {
  width: 100%;
  background: var(--green);
  color: #fff;
}

.success:hover {
  background: var(--green-dark);
}

.ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.status {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.status[data-tone="success"] {
  color: var(--green);
}

.status[data-tone="warning"] {
  color: var(--amber);
}

.status[data-tone="error"] {
  color: var(--red);
}

@media (max-width: 620px) {
  .shell {
    padding: 0;
  }

  .lookup {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .details-grid,
  .inline-controls {
    grid-template-columns: 1fr;
  }

  .foursome-list li,
  .suggestion {
    align-items: flex-start;
    flex-direction: column;
  }

  .player-meta {
    text-align: left;
  }
}
