:root {
  color-scheme: light;
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-glass: rgba(255, 255, 255, 0.85);
  --header-bg: rgba(15, 23, 42, 0.96);
  --header-border: rgba(255, 255, 255, 0.1);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --brand-teal: #0d9488;
  --brand-teal-hover: #0f766e;
  --brand-cyan: #0284c7;
  --brand-emerald: #10b981;
  --brand-amber: #d97706;
  --brand-rose: #dc2626;
  --brand-indigo: #6366f1;
  --border-color: #cbd5e1;
  --border-subtle: #e2e8f0;
  --border-focus: #0d9488;
  --ring-focus: rgba(13, 148, 136, 0.25);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 8px 12px -6px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 20px rgba(13, 148, 136, 0.15);
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}

[hidden] {
  display: none !important;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-primary);
  background-color: var(--bg-page);
  background-image: 
    radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.07) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.06) 0px, transparent 50%),
    radial-gradient(at 50% 30%, rgba(99, 102, 241, 0.04) 0px, transparent 50%);
  background-attachment: fixed;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container */
.container {
  width: min(100% - 2rem, 58rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.brand-icon {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 60%, #99f6e4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2.5rem 0 3.5rem;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 2.25rem;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.25);
  color: var(--brand-teal);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--brand-teal);
  box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(13, 148, 136, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
}

.hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 0 0.85rem;
  color: var(--text-primary);
}

.hero-desc {
  max-width: 42rem;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Panel */
.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0d9488 0%, #0284c7 50%, #10b981 100%);
}

.panel-header {
  margin-bottom: 1.25rem;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-primary);
}

.panel-title svg {
  color: var(--brand-teal);
}

/* Form & Input */
.search-form {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.entry-row {
  display: flex;
  gap: 0.75rem;
}

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s ease;
}

input[type="text"], input[type="search"], input[type="password"] {
  width: 100%;
  min-width: 0;
  border: 2px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 0.85rem 2.75rem 0.85rem 2.8rem;
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

input::placeholder {
  color: #94a3b8;
  font-weight: 400;
  text-transform: none;
}

input:hover {
  border-color: #94a3b8;
}

input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--ring-focus), var(--shadow-glow);
}

input:focus + .input-icon, .input-wrapper:focus-within .input-icon {
  color: var(--brand-teal);
}

.clear-btn {
  position: absolute;
  right: 0.75rem;
  background: #e2e8f0;
  border: 0;
  border-radius: 50%;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  color: #475569;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.clear-btn:hover {
  background: #cbd5e1;
  color: #0f172a;
}

/* Submit Button */
.submit-btn, button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.submit-btn:hover, button[type="submit"]:hover {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}

.submit-btn:active, button[type="submit"]:active {
  transform: translateY(0) scale(0.98);
}

.submit-btn:disabled, button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
}

/* Preset Chips */
.preset-section {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
}

.preset-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.chip:hover {
  border-color: var(--brand-teal);
  background: var(--brand-teal);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

/* Hints */
.input-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0.85rem 0 0;
  line-height: 1.5;
}

.input-hint svg {
  flex-shrink: 0;
  margin-top: 0.2rem;
  color: var(--brand-teal);
}

/* Mark location guide */
.mark-guide {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  margin-top: 1.5rem;
}

.mark-guide-media {
  width: 100%;
  max-width: 15rem;
  margin-inline: auto;
}

.mark-guide-photo-frame {
  position: relative;
}

.mark-guide-photo {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.mark-guide-highlight {
  position: absolute;
  left: 40%;
  top: 27%;
  width: 21%;
  height: 9%;
  border: 3px solid #f59e0b;
  border-radius: 0.4rem;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25);
  pointer-events: none;
}

.mark-guide-zoom {
  height: 7.5rem;
  margin-top: 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #e2e8f0 url('lock-mark-guide.jpg') 50% 29% / 310% auto no-repeat;
}

.mark-guide-eyebrow {
  margin: 0 0 0.35rem;
  color: var(--brand-teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mark-guide-copy h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.35;
}

.mark-guide-steps {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.mark-guide-steps li::marker {
  color: var(--brand-teal);
  font-weight: 800;
}

.mark-guide-example {
  margin: 1.1rem 0 0.7rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-weight: 700;
}

.mark-guide-open {
  color: var(--brand-teal-hover);
  font-weight: 700;
  text-underline-offset: 0.2em;
}

/* Disclaimer Card */
.disclaimer-card {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}

.disclaimer-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--brand-amber);
  margin-bottom: 0.4rem;
}

.disclaimer-body {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-inner p {
  margin: 0;
}

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Media Queries */
@media (max-width: 42rem) {
  .mark-guide {
    grid-template-columns: 1fr;
  }
  .mark-guide-media {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
  }
  .mark-guide-photo-frame {
    max-width: 11rem;
    margin-inline: auto;
  }
  .mark-guide-zoom {
    height: 8rem;
    margin-top: 0;
  }
  .header-inner {
    height: 3.75rem;
  }
  .main-content {
    padding: 1.75rem 0 2.5rem;
  }
  .entry-row {
    flex-direction: column;
  }
  .submit-btn {
    width: 100%;
    padding: 0.95rem;
  }
  .preset-section {
    flex-direction: column;
    align-items: flex-start;
  }
}
