:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: #11182b;
  --panel-2: #172038;
  --line: #2a3656;
  --text: #eef3ff;
  --muted: #9eabc6;
  --accent: #6ea8ff;
  --accent-2: #93c5fd;
  --danger: #ff7474;
  --ok: #62d49b;
  --warn: #f6c66b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(73, 111, 190, .14), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP",
               "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
}

body { padding: 24px 16px 48px; }

.shell {
  width: min(860px, 100%);
  margin: 0 auto;
}

.header {
  margin-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}

.brand-mark {
  width: 13px;
  height: 13px;
  background: linear-gradient(135deg, var(--accent), #b48cff);
  box-shadow: 0 0 20px rgba(110,168,255,.55);
}

h1 {
  margin: 12px 0 8px;
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1.2;
}

.lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.card {
  background: rgba(17, 24, 43, .96);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
  padding: 22px;
  margin-top: 18px;
}

.notice {
  border-left: 4px solid var(--warn);
  background: rgba(246,198,107,.08);
  padding: 14px 16px;
  color: #ffe5aa;
  line-height: 1.7;
  margin-bottom: 18px;
}

.notice strong { color: #fff0c7; }

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

.field {
  margin-bottom: 17px;
}

.field:last-child { margin-bottom: 0; }

label {
  display: block;
  font-weight: 700;
  margin-bottom: 7px;
}

.req {
  color: #ff9a9a;
  font-weight: 800;
  margin-left: 5px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 6px;
}

input, textarea, select {
  width: 100%;
  border: 1px solid #344263;
  background: #0d1425;
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(110,168,255,.14);
  background: #0f1729;
}

textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.6;
}

textarea.small { min-height: 92px; }

textarea[readonly], input[readonly] {
  color: #c4cee2;
  background: #0b1120;
}

details {
  border: 1px solid var(--line);
  background: #0d1425;
  padding: 12px 14px;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 20px;
  flex-wrap: wrap;
}

button, .button-link {
  appearance: none;
  border: 1px solid #48608f;
  background: #182744;
  color: white;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
}

button.primary {
  border-color: #70a9ff;
  background: linear-gradient(180deg, #377bdc, #2865bb);
}

button:hover, .button-link:hover { filter: brightness(1.08); }

button:disabled {
  opacity: .55;
  cursor: wait;
}

.status {
  min-height: 1.5em;
  margin-top: 12px;
  font-size: 14px;
}

.status.error { color: #ff9a9a; }
.status.ok { color: #8ce6b8; }

.footer {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin-top: 18px;
}

.hp {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  left: -9999px !important;
}

@media (max-width: 680px) {
  body { padding: 16px 10px 32px; }
  .card { padding: 16px; }
  .grid { grid-template-columns: 1fr; }
  .actions { justify-content: stretch; }
  .actions button, .actions .button-link { flex: 1 1 100%; text-align: center; }
}
