:root {
  color-scheme: dark;
  --bg: #090b13;
  --panel: #121622;
  --panel-2: #181b2d;
  --panel-3: #24283a;
  --ink: #f6f7ff;
  --muted: #aeb6cc;
  --line: #3d465f;
  --line-strong: #6e7892;
  --accent: #d51e24;
  --accent-2: #f1c74e;
  --ok: #47c978;
  --warn: #f1c74e;
  --bad: #ff525d;
  --blue: #3f63e9;
  --green: #2c8c50;
  --yellow: #d1d000;
  --red: #cc3830;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;
  --panel: #ffffff;
  --panel-2: #f6f8fc;
  --panel-3: #e9eef7;
  --ink: #151821;
  --muted: #5d677a;
  --line: #ccd4e3;
  --line-strong: #9aa8c2;
  --accent: #c62828;
  --accent-2: #9a6b00;
  --ok: #1e8f58;
  --warn: #b68100;
  --bad: #d6314a;
  --blue: #2f5bd9;
  --green: #2f8f55;
  --yellow: #bca900;
  --red: #cf4037;
  --shadow: 0 18px 36px rgba(21, 24, 33, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family:
    "Yu Gothic UI",
    "Meiryo",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  background:
    linear-gradient(180deg, rgba(30, 33, 48, 0.9), rgba(9, 11, 19, 1) 420px),
    var(--bg);
}

:root[data-theme="light"] body {
  background:
    linear-gradient(180deg, rgba(226, 232, 244, 0.95), rgba(244, 246, 251, 1) 420px),
    var(--bg);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  width: min(100%, 1080px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 10px 8px 24px;
}

.loading-panel {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 60vh;
  color: var(--muted);
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
}

.brand-mark img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 10px 8px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 19, 0.88);
  backdrop-filter: blur(14px);
}

.site-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.site-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.site-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.site-nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--line);
  background: var(--panel-2);
  outline: none;
}

.footer-links a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 4px;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.site-header-actions {
  grid-column: 3;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.site-theme-toggle,
.mobile-menu-toggle {
  width: 38px;
  height: 38px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.site-theme-toggle {
  display: inline-grid;
  place-items: center;
}

.site-theme-toggle:hover,
.site-theme-toggle:focus-visible,
.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus-visible {
  background: var(--panel-2);
  border-color: var(--line-strong);
  outline: none;
}

.mobile-menu-toggle {
  display: none;
  place-items: center;
  padding: 8px;
}

.mobile-menu-line {
  width: 18px;
  height: 2px;
  display: block;
  background: currentColor;
  border-radius: 999px;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.mobile-menu-line + .mobile-menu-line {
  margin-top: 4px;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hero {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 8px 8px 12px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(118px, 18vw, 168px);
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(213, 30, 36, 0.15), rgba(9, 11, 19, 0.2) 45%),
    rgba(18, 22, 34, 0.76);
  border-radius: 6px;
  padding: 18px 18px 20px;
  box-shadow: var(--shadow);
}

.hero-copy {
  min-width: 0;
}

.hero-kicker,
.page-kicker {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero-description {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.hero-map-link {
  position: relative;
  display: block;
  justify-self: end;
  width: min(100%, 168px);
  aspect-ratio: 1 / 1;
  min-height: 0;
  border: 6px solid rgba(158, 79, 255, 0.96);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(12, 16, 27, 0.84);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(158, 79, 255, 0.26);
  text-decoration: none;
  isolation: isolate;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.hero-map-link img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.06);
  transform: scale(1.02);
  transition: transform 180ms ease;
}

.hero-map-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 46%, rgba(5, 8, 15, 0.72)),
    radial-gradient(circle at 80% 20%, rgba(158, 79, 255, 0.22), transparent 42%);
  pointer-events: none;
}

.hero-map-link span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  display: inline-flex;
  justify-content: center;
  padding: 5px 8px;
  color: #fff;
  border: 1px solid rgba(202, 168, 255, 0.62);
  border-radius: 999px;
  background: rgba(45, 24, 82, 0.86);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 1px 2px #000;
}

.hero-map-link:hover,
.hero-map-link:focus-visible {
  border-color: rgba(190, 136, 255, 1);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.4),
    0 0 0 2px rgba(226, 205, 255, 0.28),
    0 0 26px rgba(158, 79, 255, 0.48);
  outline: none;
  transform: translateY(-1px);
}

.hero-map-link:hover img,
.hero-map-link:focus-visible img {
  transform: scale(1.07);
}

.site-main {
  min-height: auto;
}

.usage-guide {
  max-width: 1080px;
  margin: 0 auto 14px;
}

.speech-guide {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.speech-guide-figure {
  display: grid;
  place-items: start center;
}

.speech-guide-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

.speech-guide-bubble {
  position: relative;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.speech-guide-bubble::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 24px;
  width: 18px;
  height: 18px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}

.usage-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.usage-guide h2 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0;
}

.usage-guide-close {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.usage-guide-close:hover,
.usage-guide-close:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.usage-guide-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  line-height: 1.75;
}

.usage-guide-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.usage-guide-checkbox input {
  width: 16px;
  height: 16px;
}

.update-strip {
  position: relative;
  max-width: 1080px;
  margin: 0 auto 14px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(213, 30, 36, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent),
    var(--panel);
  box-shadow: var(--shadow);
}

.update-strip-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 18px;
  line-height: 1;
}

.update-strip-close:hover,
.update-strip-close:focus-visible {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--panel-3);
  outline: none;
}

.update-strip-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-right: 38px;
}

.update-strip-kicker {
  margin: 0 0 4px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.update-strip h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.update-strip-subtitle {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

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

.update-card {
  min-width: 0;
  display: block;
  padding: 13px;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
    var(--panel-2);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.update-card-link:hover,
.update-card-link:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--panel-3);
  outline: none;
}

.update-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.update-badge {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  color: var(--bg);
  background: var(--accent-2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.update-date {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.update-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.update-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.content-page {
  width: min(100%, 860px);
  min-height: calc(100vh - 210px);
  margin: 0 auto;
  padding: 18px 8px 28px;
}

.content-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(26, 29, 45, 0.98), rgba(16, 19, 31, 0.98));
  border-radius: 6px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.content-card h1 {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.25;
}

.content-card h2 {
  margin: 22px 0 8px;
  font-size: 17px;
  line-height: 1.4;
}

.content-card p,
.content-card li {
  color: var(--muted);
  line-height: 1.8;
}

.content-card ul {
  padding-left: 1.3em;
}

.contact-address {
  display: inline-block;
  margin: 4px 0;
  padding: 8px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #151925;
  border-radius: 4px;
  font-weight: 800;
}

.last-updated {
  margin-top: 22px;
  font-size: 12px;
}

.simulator-note {
  width: min(100%, 1080px);
  margin: 22px auto 0;
  padding: 0 8px;
}

.simulator-note-inner {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(213, 30, 36, 0.08), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
}

.simulator-note-kicker {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.simulator-note h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0;
}

.simulator-note-body {
  display: grid;
  gap: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.simulator-note-body p {
  margin: 0;
}

.simulator-note-body strong {
  color: var(--ink);
}

.simulator-note-example {
  padding: 12px 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}

.seo-intro-section,
.seo-faq-section {
  width: min(100%, 1080px);
  margin: 22px auto 0;
  padding: 0 8px;
}

.seo-intro-inner,
.seo-faq-inner {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(213, 30, 36, 0.08), transparent 42%),
    var(--panel);
  box-shadow: var(--shadow);
}

.seo-intro-kicker {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seo-intro-section h2,
.seo-faq-section h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0;
}

.seo-intro-body {
  display: grid;
  gap: 12px;
  color: var(--muted);
  line-height: 1.85;
}

.seo-intro-body p {
  margin: 0;
}

.seo-faq-list {
  display: grid;
  gap: 12px;
}

.seo-faq-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
}

.seo-faq-item h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.seo-faq-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.site-about {
  width: min(100%, 960px);
  margin: 48px auto 24px;
  padding: 20px;
  color: #dbe7ff;
  border: 1px solid rgba(110, 120, 146, 0.35);
  border-radius: 16px;
  background: rgba(18, 22, 34, 0.72);
}

.site-about h2 {
  margin: 0 0 10px;
  color: #f1c74e;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0;
}

.site-about p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
}

.site-about--compact {
  margin-top: 28px;
  margin-bottom: 20px;
  opacity: 0.92;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.title-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.title-lockup img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.title-text {
  min-width: 0;
}

.title-text h1 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
}

.title-text span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.compact-select,
.compact-input {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #171a29;
  border-radius: 4px;
}

.theme-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  white-space: nowrap;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--panel-2);
  border-color: var(--line-strong);
  outline: none;
}

.theme-toggle-icon {
  font-size: 15px;
  line-height: 1;
}

.theme-toggle-text {
  font-size: 12px;
  font-weight: 700;
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.tab-button {
  min-height: 56px;
  padding: 8px 10px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
  border: 1px solid #d8dce9;
  background: #1b1d2d;
  border-radius: 4px;
}

.tab-button[aria-selected="true"] {
  color: #161925;
  background: #f7f7fb;
  border-color: #f7f7fb;
}

.tab-button.primary-tab {
  font-weight: 900;
}

.tab-button.primary-tab[aria-selected="true"] {
  box-shadow: 0 0 0 2px rgba(241, 199, 78, 0.22);
}

.tab-button:focus-visible,
.icon-button:focus-visible,
.primary-button:focus-visible,
.danger-button:focus-visible,
.secondary-button:focus-visible,
.theme-toggle:focus-visible {
  outline: 3px solid rgba(241, 199, 78, 0.42);
  outline-offset: 2px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}

.tool-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(26, 29, 45, 0.98), rgba(16, 19, 31, 0.98));
  border-radius: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tool-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 19, 0.26);
}

.tool-panel-header h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0;
}

.list-panel-header {
  align-items: flex-start;
}

.list-panel-header .list-action-row {
  flex: 1 1 auto;
}

.tool-panel-body {
  padding: 10px;
}

.center-label {
  margin: 0 0 10px;
  text-align: center;
  font-weight: 700;
}

.form-grid {
  display: grid;
  gap: 9px;
}

.form-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.form-row label {
  color: var(--ink);
  font-weight: 700;
}

.form-row.stack {
  grid-template-columns: 1fr;
  gap: 6px;
}

.form-row.effect-slot,
.form-row.debuff-slot {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 6px;
}

.effect-slot,
.debuff-slot {
  display: grid;
}

.effect-slot {
  margin-top: 4px;
}

.effect-slot > label {
  color: var(--ink);
  font-weight: 800;
}

.effect-slot-controls,
.debuff-slot-controls {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.effect-slot-controls {
  width: 100%;
}

.debuff-slot {
  width: min(88%, 720px);
  margin: -2px 0 4px 42px;
  padding: 8px 10px 10px;
  border-left: 2px solid var(--line);
  border-radius: 0 0 14px 14px;
  background: rgba(255, 255, 255, 0.025);
}

.debuff-slot > label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subslot-marker {
  color: var(--accent-2);
  font-size: 13px;
  line-height: 1;
}

.required-pill {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 6px;
  color: var(--bg);
  background: var(--accent-2);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.debuff-slot.is-disabled {
  opacity: 0.62;
}

.debuff-slot.is-disabled .required-pill {
  display: none;
}

.nightfarer-row {
  align-items: start;
  grid-template-columns: 72px minmax(0, 1fr);
}

.nightfarer-row > label {
  padding-top: 6px;
}

.nightfarer-list {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nightfarer-chip {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #242334;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nightfarer-chip img {
  width: 25px;
  height: 25px;
  display: block;
  object-fit: contain;
}

.nightfarer-chip.wylder,
.nightfarer-chip.executor {
  border-color: rgba(201, 112, 68, 0.86);
}

.nightfarer-chip.guardian,
.nightfarer-chip.revenant,
.nightfarer-chip.scholar {
  border-color: rgba(145, 178, 214, 0.82);
}

.nightfarer-chip.ironeye,
.nightfarer-chip.duchess,
.nightfarer-chip.raider {
  border-color: rgba(168, 143, 215, 0.82);
}

.nightfarer-chip.recluse,
.nightfarer-chip.undertaker {
  border-color: rgba(132, 192, 150, 0.82);
}

.select-wrap {
  position: relative;
  min-width: 0;
}

.search-input-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.search-input-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
}

.search-input,
.select-input,
.text-area {
  width: 100%;
  min-height: 31px;
  padding: 6px 9px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #262a3d;
  border-radius: 4px;
  outline: none;
}

.search-input:focus,
.select-input:focus,
.text-area:focus,
.compact-select:focus,
.compact-input:focus {
  border-color: #8d98b6;
  box-shadow: 0 0 0 3px rgba(141, 152, 182, 0.2);
}

.select-input {
  appearance: none;
  padding-right: 34px;
}

.search-input.has-search-icon {
  padding-left: 32px;
}

.search-input-wrap .search-input,
.effect-slot-controls select,
.debuff-slot-controls select,
.effect-slot-controls .compact-select,
.debuff-slot-controls .compact-select {
  width: 100%;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.text-area {
  min-height: 88px;
  resize: vertical;
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.list-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.list-action-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 11px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.list-action-button:hover,
.list-action-button:focus-visible {
  border-color: var(--line-strong);
  background: var(--panel-3);
  outline: none;
}

.list-action-icon {
  font-size: 15px;
  line-height: 1;
}

.list-action-label {
  line-height: 1;
}

.danger-list-action {
  color: var(--bad);
  border-color: rgba(255, 82, 93, 0.45);
  background: rgba(255, 82, 93, 0.08);
}

.danger-list-action:hover,
.danger-list-action:focus-visible {
  color: #fff;
  border-color: var(--bad);
  background: var(--bad);
}

.list-action-help {
  width: 100%;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.primary-button,
.danger-button,
.secondary-button {
  min-height: 32px;
  padding: 7px 12px;
  color: var(--ink);
  font-weight: 800;
  border-radius: 4px;
}

.primary-button {
  border: 1px solid #f0d16a;
  background: #9a7b10;
}

.danger-button {
  width: 100%;
  border: 1px solid #bf292d;
  background: linear-gradient(180deg, #d82027, #a60f16);
  font-size: 18px;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: #222638;
}

.icon-button {
  min-width: 32px;
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #1b1f30;
  border-radius: 4px;
}

.relic-card-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.save-generated-button {
  color: var(--ok);
  border-color: rgba(71, 201, 120, 0.45);
  background: rgba(71, 201, 120, 0.1);
  font-weight: 900;
}

.save-generated-button:hover,
.save-generated-button:focus-visible {
  color: var(--bg);
  border-color: var(--ok);
  background: var(--ok);
  outline: none;
}

.save-generated-button.is-saved,
.save-generated-button:disabled {
  color: var(--muted);
  border-color: var(--line);
  background: var(--panel-2);
  opacity: 0.75;
}

.save-generated-icon {
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
}

.x-share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink);
  border-color: var(--line);
  background: var(--panel-2);
  font-weight: 900;
}

.x-share-button:hover,
.x-share-button:focus-visible {
  color: var(--bg);
  border-color: var(--accent-2);
  background: var(--accent-2);
  outline: none;
}

.x-share-mark {
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
}

.share-arrow {
  font-size: 11px;
  line-height: 1;
  transform: translateY(-1px);
}

.copy-icon,
.trash-icon,
.download-icon,
.import-icon {
  width: 15px;
  height: 15px;
  display: inline-block;
  position: relative;
}

.copy-icon::before,
.copy-icon::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.copy-icon::before {
  left: 0;
  top: 3px;
  opacity: 0.65;
}

.copy-icon::after {
  right: 0;
  top: 0;
}

.trash-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 5px;
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
  border-top: 0;
}

.trash-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 11px;
  height: 2px;
  background: currentColor;
  box-shadow: 3px -2px 0 -1px currentColor;
}

.download-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  width: 3px;
  height: 9px;
  background: currentColor;
}

.download-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 11px;
  height: 11px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.import-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  width: 3px;
  height: 9px;
  background: currentColor;
}

.import-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  width: 11px;
  height: 11px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(135deg);
}

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

.color-button {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #222638;
  border-radius: 4px;
}

.color-button[aria-pressed="true"] {
  border-color: #f1f3ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.color-button.all {
  width: auto;
  padding: 0 9px;
  color: var(--ink);
  font-weight: 700;
}

.gem {
  width: 17px;
  height: 21px;
  display: block;
  border-radius: 11px 11px 12px 12px;
  transform: rotate(-8deg);
  box-shadow:
    inset -4px -6px 0 rgba(0, 0, 0, 0.28),
    inset 3px 4px 0 rgba(255, 255, 255, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.45);
  clip-path: polygon(50% 0, 82% 28%, 100% 68%, 50% 100%, 0 68%, 18% 28%);
}

.gem.red {
  background: var(--red);
}

.gem.blue {
  background: var(--blue);
}

.gem.yellow {
  background: var(--yellow);
}

.gem.green {
  background: var(--green);
}

.status-panel {
  border-top: 1px dotted var(--line-strong);
  margin-top: 14px;
  padding-top: 12px;
}

.status-box {
  min-height: 32px;
  display: grid;
  place-items: center;
  padding: 7px 10px;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  border: 1px solid var(--line);
  background: #151925;
  border-radius: 4px;
}

.status-box.valid {
  border-color: rgba(71, 201, 120, 0.65);
  color: #cff7dc;
}

.status-box.invalid {
  border-color: rgba(255, 82, 93, 0.7);
  color: #ffd2d6;
}

.hit-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hit-badge .gem {
  width: 12px;
  height: 15px;
  box-shadow:
    inset -2px -3px 0 rgba(0, 0, 0, 0.28),
    inset 2px 2px 0 rgba(255, 255, 255, 0.18),
    0 1px 5px rgba(0, 0, 0, 0.35);
}

.hit-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: rgba(241, 199, 78, 0.65);
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(241, 199, 78, 0.08), transparent),
    var(--panel-2);
}

.hit-status-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hit-status-content .gem {
  width: 13px;
  height: 16px;
}

.result-actions {
  margin-top: 8px;
}

.result-toggle-button {
  width: 100%;
}

.result-list {
  display: grid;
  gap: 8px;
}

.relic-card {
  border: 1px solid var(--line);
  background: #151925;
  border-radius: 4px;
  overflow: hidden;
}

.relic-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(61, 70, 95, 0.72);
}

.relic-card-title {
  min-width: 0;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.relic-card-mode {
  color: var(--muted);
  font-size: 12px;
}

.effect-lines {
  list-style: none;
  margin: 0;
  padding: 8px 10px 10px;
  display: grid;
  gap: 5px;
}

.effect-lines li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 6px;
  color: var(--ink);
  line-height: 1.45;
}

.effect-lines span {
  color: var(--muted);
  font-weight: 700;
}

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

.meta-chip {
  min-width: 0;
  padding: 7px 8px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: #151925;
  border-radius: 4px;
}

.meta-chip strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.reason-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.reason-list li {
  padding: 7px 8px;
  color: #ffd2d6;
  border: 1px solid rgba(255, 82, 93, 0.45);
  background: rgba(255, 82, 93, 0.08);
  border-radius: 4px;
}

.table-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-bottom: 10px;
}

.effects-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.effects-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  background: #151925;
}

.effects-table th,
.effects-table td {
  padding: 8px 9px;
  border-bottom: 1px solid rgba(61, 70, 95, 0.7);
  text-align: left;
  vertical-align: top;
}

.effects-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--ink);
  background: #202437;
}

.effects-table td {
  color: var(--muted);
}

.effects-table td.name-cell {
  color: var(--ink);
  min-width: 280px;
}

.pill {
  display: inline-grid;
  place-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #222638;
  font-size: 12px;
  font-weight: 700;
}

.pill.cursed {
  color: #fff0b5;
  border-color: rgba(241, 199, 78, 0.5);
  background: rgba(241, 199, 78, 0.12);
}

.empty-state {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  border: 1px solid var(--line);
  background: #151925;
  border-radius: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 20;
  max-width: min(440px, calc(100% - 24px));
  padding: 10px 14px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: #151925;
  border-radius: 4px;
  box-shadow: var(--shadow);
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.site-footer {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 18px 8px 28px;
  display: grid;
  gap: 8px;
  place-items: center;
  color: var(--muted);
  border-top: 1px solid rgba(61, 70, 95, 0.55);
}

.footer-links,
.result-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.footer-copy {
  margin: 0;
  font-size: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root[data-theme="light"] .hero,
:root[data-theme="light"] .content-card,
:root[data-theme="light"] .tool-panel,
:root[data-theme="light"] .status-box,
:root[data-theme="light"] .relic-card,
:root[data-theme="light"] .effects-table th,
:root[data-theme="light"] .contact-address,
:root[data-theme="light"] .meta-chip {
  background: var(--panel);
}

:root[data-theme="light"] .site-header {
  background: rgba(244, 246, 251, 0.9);
}

:root[data-theme="light"] .tool-panel-header,
:root[data-theme="light"] .effects-table td,
:root[data-theme="light"] .color-button,
:root[data-theme="light"] .secondary-button,
:root[data-theme="light"] .list-action-button,
:root[data-theme="light"] .icon-button,
:root[data-theme="light"] .compact-select,
:root[data-theme="light"] .compact-input,
:root[data-theme="light"] .search-input,
:root[data-theme="light"] .select-input,
:root[data-theme="light"] .text-area,
:root[data-theme="light"] .nightfarer-chip {
  background: var(--panel-2);
}

:root[data-theme="light"] .tab-button {
  background: var(--panel-2);
  border-color: var(--line);
}

:root[data-theme="light"] .list-action-button:hover,
:root[data-theme="light"] .list-action-button:focus-visible {
  background: var(--panel-2);
}

:root[data-theme="light"] .save-generated-button.is-saved,
:root[data-theme="light"] .save-generated-button:disabled,
:root[data-theme="light"] .x-share-button {
  background: var(--panel);
}

:root[data-theme="light"] .tab-button[aria-selected="true"] {
  color: #ffffff;
  background: #202437;
  border-color: #202437;
}

:root[data-theme="light"] .status-box.valid {
  color: #17683f;
}

:root[data-theme="light"] .status-box.invalid,
:root[data-theme="light"] .reason-list {
  color: #a41f35;
}

:root[data-theme="light"] .site-footer {
  border-top-color: var(--line);
}

:root[data-theme="light"] .speech-guide-icon {
  filter: drop-shadow(0 10px 16px rgba(21, 24, 33, 0.16));
}

:root[data-theme="light"] .debuff-slot {
  background: rgba(15, 23, 42, 0.025);
}

:root[data-theme="light"] .simulator-note-inner {
  background:
    linear-gradient(135deg, rgba(198, 40, 40, 0.06), transparent 42%),
    var(--panel);
}

:root[data-theme="light"] .seo-intro-inner,
:root[data-theme="light"] .seo-faq-inner {
  background:
    linear-gradient(135deg, rgba(198, 40, 40, 0.06), transparent 42%),
    var(--panel);
}

:root[data-theme="light"] .update-strip {
  background:
    radial-gradient(circle at top left, rgba(198, 40, 40, 0.08), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), transparent),
    var(--panel);
}

:root[data-theme="light"] .update-badge {
  color: #ffffff;
  background: var(--accent);
}

:root[data-theme="light"] .hit-badge,
:root[data-theme="light"] .hit-status {
  background: var(--panel);
}

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

  .toolbar {
    justify-content: stretch;
  }

  .compact-select,
  .compact-input {
    flex: 1 1 150px;
  }

  .split-layout {
    grid-template-columns: 1fr;
  }

  .table-tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .footer-links {
    flex-direction: column;
    align-items: stretch;
  }

  .list-action-row {
    justify-content: stretch;
  }

  .list-panel-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .list-action-button {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
  }

  .list-action-label {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px 10px;
  }

  .site-brand {
    max-width: 100%;
    font-size: 15px;
  }

  .site-brand img {
    width: 28px;
    height: 28px;
  }

  .site-header-actions {
    display: inline-flex;
  }

  .mobile-menu-toggle {
    display: inline-grid;
  }

  .site-nav {
    position: fixed;
    top: 56px;
    left: 10px;
    right: 10px;
    z-index: 90;
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(18, 22, 34, 0.98);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  :root[data-theme="light"] .site-nav {
    background: rgba(255, 255, 255, 0.98);
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    width: 100%;
    min-height: 42px;
    justify-content: flex-start;
    padding: 10px 12px;
    border-radius: 12px;
  }

  .footer-links a {
    justify-content: center;
  }

  body.mobile-menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(0, 0, 0, 0.38);
  }

  :root[data-theme="light"] body.mobile-menu-open::before {
    background: rgba(15, 23, 42, 0.18);
  }

  .hero-title {
    font-size: 24px;
  }

  .hero {
    padding: 8px 5px 10px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr) clamp(104px, 32vw, 124px);
    gap: 10px;
    padding: 14px 12px 16px;
  }

  .hero-description {
    font-size: 14px;
    line-height: 1.55;
  }

  .hero-map-link {
    width: min(100%, 124px);
    border-width: 5px;
  }

  .hero-map-link span {
    left: 5px;
    right: 5px;
    bottom: 5px;
    padding: 4px 6px;
    font-size: 10px;
  }

  .content-card {
    padding: 16px;
  }

  .usage-guide {
    margin: 0 0 12px;
  }

  .update-strip {
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 18px;
  }

  .update-strip-close {
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
  }

  .update-strip-header {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    padding-right: 34px;
  }

  .update-strip-subtitle {
    max-width: none;
    text-align: left;
  }

  .update-strip-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .update-card {
    flex: 0 0 min(86vw, 320px);
    scroll-snap-align: start;
  }

  .speech-guide {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .speech-guide-figure {
    place-items: center;
  }

  .speech-guide-icon {
    width: 72px;
    height: 72px;
  }

  .speech-guide-bubble {
    padding: 14px;
    border-radius: 14px;
  }

  .speech-guide-bubble::before {
    left: 24px;
    top: -10px;
    transform: rotate(135deg);
  }

  .usage-guide-list {
    font-size: 14px;
    line-height: 1.65;
  }

  .result-actions {
    position: sticky;
    bottom: 8px;
    z-index: 10;
    justify-content: stretch;
    padding: 8px;
    border: 1px solid var(--line);
    background: rgba(18, 22, 34, 0.96);
    backdrop-filter: blur(8px);
  }

  .result-actions .secondary-button {
    flex: 1 1 140px;
  }

  .theme-toggle {
    min-height: 34px;
    padding: 0 10px;
  }

  .debuff-slot {
    width: calc(100% - 20px);
    margin-left: 20px;
    margin-right: 0;
    padding: 8px 8px 10px;
  }

  .debuff-slot > label {
    font-size: 11px;
  }

  .search-input-icon {
    left: 10px;
  }

  .search-input.has-search-icon {
    padding-left: 30px;
  }

  .simulator-note {
    margin-top: 18px;
  }

  .simulator-note-inner {
    padding: 16px;
    border-radius: 16px;
  }

  .simulator-note h2 {
    font-size: 18px;
  }

  .simulator-note-body {
    gap: 10px;
    font-size: 13px;
    line-height: 1.75;
  }

  .simulator-note-example {
    padding: 10px 12px;
  }

  .seo-intro-section,
  .seo-faq-section {
    margin-top: 18px;
  }

  .seo-intro-inner,
  .seo-faq-inner {
    padding: 16px;
    border-radius: 16px;
  }

  .seo-intro-section h2,
  .seo-faq-section h2 {
    font-size: 18px;
  }

  .seo-intro-body,
  .seo-faq-item p {
    font-size: 13px;
    line-height: 1.75;
  }
}

@media (max-width: 520px) {
  .app-shell {
    padding: 7px 5px 18px;
  }

  .topbar {
    margin-bottom: 8px;
  }

  .title-lockup {
    align-items: flex-start;
  }

  .tabbar {
    gap: 5px;
  }

  .tab-button {
    min-height: 56px;
    padding: 6px 5px;
    font-size: 13px;
  }

  .form-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 7px;
  }

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

  .danger-button {
    font-size: 16px;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) clamp(94px, 31vw, 116px);
    gap: 8px;
    padding: 12px 10px;
  }

  .hero-map-link {
    width: min(100%, 116px);
  }

  .hero-title {
    font-size: 21px;
  }

  .hero-description {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.48;
  }

  .relic-card-actions {
    justify-content: flex-end;
  }

  .list-action-button {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .debuff-slot {
    width: 100%;
    margin-left: 0;
  }
}
