@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap");

:root {
  --bg: #f5f9ff;
  --bg-accent: #ffe8e8;
  --footer-bg: repeating-linear-gradient(
    -58deg,
    #ffffff 0 10px,
    #ff7070 10px 13px,
    #ffffff 13px 23px,
    #4ca5ff 23px 26px,
    #ffffff 26px 36px
  );
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --ink: #17324d;
  --ink-soft: #50708f;
  --line: rgba(76, 165, 255, 0.14);
  --brand: #4ca5ff;
  --brand-strong: #2d82da;
  --warm: #ff7070;
  --shadow: 0 20px 60px rgba(76, 165, 255, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", "Yu Gothic UI", sans-serif;
  background:
    linear-gradient(rgba(243, 246, 251, 0.8), rgba(243, 246, 251, 0.8)),
    url("../wallpaper/wallpaper_1.jpg") center / cover fixed no-repeat;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(min(1120px, calc(100% - 32px)) + 56px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.68)),
    linear-gradient(90deg, rgba(76, 165, 255, 0.08) 0%, rgba(255, 255, 255, 0) 16%, rgba(255, 255, 255, 0) 84%, rgba(255, 112, 112, 0.08) 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) center / calc(100% - 20px) 100% no-repeat,
    conic-gradient(from 45deg at 0 50%, #000 90deg, transparent 0) left top / 10px 20px repeat-y,
    conic-gradient(from 225deg at 100% 50%, #000 90deg, transparent 0) right top / 10px 20px repeat-y;
  mask:
    linear-gradient(#000 0 0) center / calc(100% - 20px) 100% no-repeat,
    conic-gradient(from 45deg at 0 50%, #000 90deg, transparent 0) left top / 10px 20px repeat-y,
    conic-gradient(from 225deg at 100% 50%, #000 90deg, transparent 0) right top / 10px 20px repeat-y;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.42),
    0 22px 52px rgba(47, 73, 105, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 14px 0 24px rgba(76, 165, 255, 0.06),
    inset -14px 0 24px rgba(255, 112, 112, 0.06);
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.page-shell {
  position: relative;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero {
  margin-bottom: 26px;
  padding: 26px 30px;
  border: 1px solid rgba(76, 165, 255, 0.1);
  border-radius: calc(var(--radius) + 10px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.9));
  box-shadow: var(--shadow);
}

.eyebrow,
.hero h1,
.mode-pill span,
.run-button,
.results-header h2 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a:focus {
  text-decoration: underline;
}

.breadcrumb-separator {
  opacity: 0.72;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.04;
}

.hero-copy {
  max-width: 54rem;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.8;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.95fr);
  grid-template-areas: "control sidebar";
  gap: 22px;
  align-items: start;
}

.control-panel {
  grid-area: control;
}

.sidebar {
  grid-area: sidebar;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.control-panel,
.info-panel,
.template-panel,
.results-panel {
  padding: 22px;
}

.tool-form,
.sidebar {
  display: grid;
  gap: 18px;
}

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mode-pill {
  position: relative;
  display: inline-flex;
}

.mode-pill input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.mode-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(76, 165, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.mode-pill input:checked + span {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-color: transparent;
  color: white;
  transform: translateY(-1px);
}

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

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.four-columns {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.search-grid {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
}

.single-row {
  grid-template-columns: minmax(0, 1fr);
}

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

.field-spacer {
  min-height: 1px;
}

.skill-combobox {
  position: relative;
}

.field span,
.mode-panel h2,
.info-panel h2,
.template-panel h2,
.status-panel h2 {
  font-weight: 700;
}

.field span {
  font-size: 0.92rem;
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(76, 165, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
}

.skill-dropdown {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid rgba(76, 165, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 28px rgba(76, 165, 255, 0.14);
}

.skill-dropdown.is-hidden {
  display: none;
}

.skill-option {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: none;
  border-bottom: 1px solid rgba(76, 165, 255, 0.08);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.skill-option:last-child {
  border-bottom: none;
}

.skill-option:hover,
.skill-option.is-active {
  background: rgba(76, 165, 255, 0.1);
}

.skill-option-empty {
  padding: 12px 14px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.field input:focus,
.field select:focus,
.run-button:focus {
  outline: 2px solid rgba(76, 165, 255, 0.26);
  outline-offset: 2px;
}

.mode-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.mode-panel h2,
.info-panel h2,
.template-panel h2,
.status-panel h2,
.results-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.is-hidden {
  display: none;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.actions {
  display: flex;
  justify-content: flex-start;
}

.inline-status-panel {
  flex: 1;
  display: grid;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid rgba(30, 43, 38, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.status-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.inline-status-panel p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.run-button {
  min-height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--warm), #ad4e1d);
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(173, 78, 29, 0.26);
}

.run-button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.info-list {
  display: grid;
  grid-template-columns: minmax(0, 120px) minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.usage-guide {
  color: var(--ink);
}

.usage-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 1.4rem;
}

.usage-step {
  color: var(--ink-soft);
  line-height: 1.7;
}

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

.template-button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(76, 165, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.template-button:hover,
.template-button:focus {
  background: rgba(76, 165, 255, 0.08);
  border-color: rgba(255, 112, 112, 0.24);
  transform: translateY(-1px);
}

.info-list dt {
  color: var(--ink-soft);
  font-weight: 500;
}

.info-list dd {
  margin: 0;
  font-weight: 700;
}

.progress-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(76, 165, 255, 0.1);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--warm));
  transition: width 140ms ease;
}

.status-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.7;
}

.results-panel {
  margin-top: 22px;
}

.results-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 14px;
}

.results-header p {
  margin: 0;
  color: var(--ink-soft);
}

.results {
  display: grid;
  gap: 12px;
}

.result-section,
.watch-card,
.empty-state {
  padding: 16px 18px;
  border: 1px solid rgba(30, 43, 38, 0.1);
  border-radius: 18px;
  background: var(--panel-strong);
}

.result-section {
  display: grid;
  gap: 12px;
}

.result-context {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.result-context-item {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.5;
}

.result-context-item strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
}

.result-table th,
.result-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(30, 43, 38, 0.1);
  text-align: left;
}

.result-table th {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.result-table td {
  font-weight: 600;
}

.result-table > tbody:last-of-type > tr:last-child td {
  border-bottom: none;
}

.around-result-table .around-pivot-body td {
  color: #b42318;
  font-weight: 800;
}

.around-result-table tr.reward-match-row td {
  color: #1d4ed8;
  font-weight: 800;
}

.metric {
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(76, 165, 255, 0.06);
}

.metric strong,
.watch-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.metric span,
.watch-card span {
  display: block;
  font-weight: 700;
}

.empty-state {
  color: var(--ink-soft);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.92);
  background: var(--footer-bg);
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.66));
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 14px 0 18px;
  justify-items: center;
  text-align: center;
}

.footer-copy p {
  margin: 0;
  color: #35506c;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.footer-links a {
  color: #35506c;
  text-decoration: none;
}

.footer-links a:hover {
  color: #ff7070;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "control"
      "sidebar";
  }

  .control-panel,
  .sidebar {
    grid-area: auto;
  }

  .search-grid,
  .four-columns,
  .two-columns,
  .three-columns,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .action-row {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 100%);
    padding-top: 18px;
  }

  .hero,
  .control-panel,
  .info-panel,
  .template-panel,
  .results-panel {
    padding: 18px;
  }

  .footer-inner {
    padding: 10px 0 14px;
  }
}