.vdt-wos {
  --vdt-navy: #081426;
  --vdt-navy2: #0b1f3a;
  --vdt-ice: #7fe8ff;
  --vdt-ice2: #b8f4ff;
  --vdt-white: #f7fbff;
  --vdt-border: rgba(184, 244, 255, 0.35);
  --vdt-border-strong: rgba(127, 232, 255, 0.65);
  --vdt-shadow: rgba(0, 0, 0, 0.45);
  --vdt-text: rgba(247, 251, 255, 0.92);
  --vdt-muted: rgba(247, 251, 255, 0.72);
  --vdt-danger: #ff6b7a;

  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP",
    "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  color: var(--vdt-text);
  margin: 24px 0;
}

.vdt-wos__frame {
  background: radial-gradient(1200px 600px at 15% 10%, rgba(127, 232, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(184, 244, 255, 0.12), transparent 50%),
    linear-gradient(135deg, var(--vdt-navy), var(--vdt-navy2));
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 48px var(--vdt-shadow);
  overflow: hidden;
  position: relative;
}

.vdt-wos__frame::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, rgba(127, 232, 255, 0.55), rgba(255, 255, 255, 0.08), rgba(127, 232, 255, 0.35));
  filter: blur(14px);
  opacity: 0.32;
  pointer-events: none;
}

.vdt-wos__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

.vdt-wos__header,
.vdt-wos__footer,
.vdt-wos__grid,
.vdt-wos__calcNav {
  position: relative;
  z-index: 1;
}

.vdt-wos__header {
  padding: 18px 22px 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vdt-wos__title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.vdt-wos__subtitle {
  font-size: 12px;
  color: var(--vdt-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Cross-links between calculators --- */
.vdt-wos__calcNav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 18px;
  padding: 12px 22px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(127, 232, 255, 0.06), transparent);
}

.vdt-wos__calcNav-head {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--vdt-muted);
  line-height: 1.35;
  max-width: 11em;
}

.vdt-wos__calcNav-headEn {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
  opacity: 0.9;
}

.vdt-wos__calcNav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  flex: 1 1 200px;
  justify-content: flex-end;
}

.vdt-wos__calcNav-link {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--vdt-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--vdt-ice2);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  max-width: 220px;
}

.vdt-wos__calcNav-link:hover,
.vdt-wos__calcNav-link:focus-visible {
  border-color: var(--vdt-border-strong);
  background: rgba(127, 232, 255, 0.12);
  color: var(--vdt-white);
  outline: none;
}

@media (max-width: 520px) {
  .vdt-wos__calcNav {
    flex-direction: column;
    align-items: stretch;
  }

  .vdt-wos__calcNav-links {
    justify-content: flex-start;
  }

  .vdt-wos__calcNav-link {
    max-width: none;
  }
}

.vdt-wos__grid {
  padding: 18px 18px 6px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.vdt-wos__card {
  grid-column: span 12;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--vdt-border);
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

.vdt-wos__cardTitle {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  color: rgba(247, 251, 255, 0.95);
}

.vdt-wos__row {
  display: grid;
  gap: 10px;
}

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

.vdt-wos__row--buffs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.vdt-wos__field {
  display: grid;
  gap: 6px;
}

.vdt-wos__field--wide {
  grid-column: span 12;
}

.vdt-wos__label {
  font-size: 12px;
  color: var(--vdt-muted);
}

.vdt-wos__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(184, 244, 255, 0.28);
  background: linear-gradient(180deg, rgba(8, 20, 38, 0.78), rgba(8, 20, 38, 0.55));
  color: var(--vdt-white);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.vdt-wos__input:focus {
  border-color: var(--vdt-border-strong);
  box-shadow: 0 0 0 3px rgba(127, 232, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.vdt-wos__help {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(247, 251, 255, 0.7);
}

.vdt-wos__card--result {
  border-color: rgba(127, 232, 255, 0.42);
  background: radial-gradient(650px 260px at 20% 0%, rgba(127, 232, 255, 0.15), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
}

.vdt-wos__result {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.vdt-wos__resultLine {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(8, 20, 38, 0.64), rgba(8, 20, 38, 0.42));
}

.vdt-wos__resultLabel {
  font-size: 12px;
  color: var(--vdt-muted);
}

.vdt-wos__resultValue {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(247, 251, 255, 0.95);
}

.vdt-wos__error {
  min-height: 18px;
  font-size: 12px;
  color: var(--vdt-danger);
}

.vdt-wos__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.vdt-wos__btn {
  appearance: none;
  border: 1px solid rgba(127, 232, 255, 0.55);
  background: linear-gradient(180deg, rgba(127, 232, 255, 0.22), rgba(127, 232, 255, 0.08));
  color: rgba(247, 251, 255, 0.95);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.vdt-wos__btn:hover {
  border-color: rgba(127, 232, 255, 0.8);
  background: linear-gradient(180deg, rgba(127, 232, 255, 0.26), rgba(127, 232, 255, 0.1));
}

.vdt-wos__btn:active {
  transform: translateY(1px);
}

.vdt-wos__btn--ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.16);
}

.vdt-wos__footer {
  padding: 10px 16px 14px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.vdt-wos__note {
  font-size: 11px;
  color: rgba(247, 251, 255, 0.55);
  letter-spacing: 0.08em;
}

@media (max-width: 860px) {
  .vdt-wos__row--buffs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .vdt-wos__row--time {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .vdt-wos__resultLine {
    grid-template-columns: 1fr;
  }
}

/* Research buffs (3 columns) */
.vdt-wos__row--research-buffs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 860px) {
  .vdt-wos__row--research-buffs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- WOS Calc Guide --- */
.vdt-wos__grid--guide {
  padding: 14px 18px 18px;
}

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

.vdt-wos-guide__item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(184, 244, 255, 0.20);
  border-radius: 14px;
  padding: 12px 12px 10px;
}

.vdt-wos-guide__itemTitle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(247, 251, 255, 0.95);
  margin-bottom: 8px;
}

.vdt-wos-guide__icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(127, 232, 255, 0.55);
  background: radial-gradient(circle at 30% 25%, rgba(127, 232, 255, 0.85), rgba(127, 232, 255, 0.14) 62%, rgba(127, 232, 255, 0) 72%);
  box-shadow: 0 0 0 3px rgba(127, 232, 255, 0.06), 0 0 22px rgba(127, 232, 255, 0.12);
  position: relative;
  flex: 0 0 auto;
}

.vdt-wos-guide__icon::before,
.vdt-wos-guide__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(191, 239, 255, 0.95);
  transform: translate(-50%, -50%);
}

.vdt-wos-guide__icon::before {
  width: 2px;
  height: 12px;
  opacity: 0.95;
}

.vdt-wos-guide__icon::after {
  width: 12px;
  height: 2px;
  opacity: 0.95;
}

.vdt-wos-guide__list {
  margin: 0;
  padding-left: 18px;
}

.vdt-wos-guide__list li {
  margin: 8px 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(247, 251, 255, 0.80);
}

.vdt-wos-guide__mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
  color: rgba(191, 239, 255, 0.95);
}

.vdt-wos-guide__actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.vdt-wos-guide__btn {
  min-width: 240px;
}

.vdt-wos-guide__note {
  margin-top: 10px;
  font-size: 11px;
  color: rgba(247, 251, 255, 0.60);
  letter-spacing: 0.03em;
}

@media (max-width: 860px) {
  .vdt-wos-guide__items {
    grid-template-columns: 1fr;
  }
}

/* --- Hero gear level-up calculator --- */
.vdt-wos-hero__state-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
  gap: 12px;
  align-items: end;
}

.vdt-wos-hero__rarity-level {
  min-width: 0;
}

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

.vdt-wos-seg__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vdt-wos-seg__btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(184, 244, 255, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.05));
  color: rgba(247, 251, 255, 0.82);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  user-select: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.vdt-wos-seg__input:checked + .vdt-wos-seg__btn {
  border-color: rgba(127, 232, 255, 0.76);
  background: linear-gradient(180deg, rgba(127, 232, 255, 0.28), rgba(127, 232, 255, 0.12));
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(127, 232, 255, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.vdt-wos-seg__btn:hover {
  border-color: rgba(127, 232, 255, 0.56);
}

.vdt-wos-seg__input:focus-visible + .vdt-wos-seg__btn {
  outline: 2px solid rgba(127, 232, 255, 0.72);
  outline-offset: 2px;
}

.vdt-wos__input--select {
  cursor: pointer;
  appearance: none;
  /* ネイティブのプルダウンをダーク寄りに（未選択の option が白背景＋白文字になるのを防ぐ） */
  color-scheme: dark;
  background-image: linear-gradient(45deg, transparent 50%, rgba(127, 232, 255, 0.85) 50%),
    linear-gradient(135deg, rgba(127, 232, 255, 0.85) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

/* 開いたリスト内の選択肢（対応ブラウザでは背景・文字色を明示） */
.vdt-wos__input--select option {
  background-color: #0b1f3a;
  color: #f7fbff;
}

.vdt-wos__input--select option:checked,
.vdt-wos__input--select option:hover {
  background-color: #123a66;
  color: #ffffff;
}

.vdt-wos-hero__result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

/* 旧形式（calc-hero-gear 互換） */
.vdt-wos-hero__result-cell {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(8, 20, 38, 0.64), rgba(8, 20, 38, 0.42));
}

/* アイコン付きカード形式（calc-hero-gear） */
.vdt-wos-hero__result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(8, 20, 38, 0.64), rgba(8, 20, 38, 0.42));
}

.vdt-wos-hero__result-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(127, 232, 255, 0.12);
  border: 1px solid rgba(127, 232, 255, 0.3);
  position: relative;
}

.vdt-wos-hero__result-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(191, 239, 255, 0.9);
}

/* 経験値：上向き矢印 */
.vdt-wos-hero__result-card--xp .vdt-wos-hero__result-icon::before {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid rgba(191, 239, 255, 0.9);
  background: none;
  top: 45%;
}

/* レジェンド装備：シールド風 */
.vdt-wos-hero__result-card--legend .vdt-wos-hero__result-icon::before {
  width: 14px;
  height: 18px;
  border-radius: 2px 2px 4px 4px;
  border: 2px solid rgba(191, 239, 255, 0.9);
  background: transparent;
}

/* ミスリル：ひし形 */
.vdt-wos-hero__result-card--mithril .vdt-wos-hero__result-icon::before {
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: rgba(191, 239, 255, 0.9);
}

/* 精錬エナジー石：丸 */
.vdt-wos-hero__result-card--stone .vdt-wos-hero__result-icon::before {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(191, 239, 255, 0.9);
}

.vdt-wos-hero__result-content {
  min-width: 0;
}

.vdt-wos-hero__result-label {
  font-size: 11px;
  color: var(--vdt-muted);
  margin-bottom: 4px;
}

.vdt-wos-hero__result-value {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(247, 251, 255, 0.95);
}

.vdt-wos-hero__error {
  min-height: 20px;
  margin-bottom: 8px;
}

.vdt-wos-hero__help {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(247, 251, 255, 0.58);
}

@media (max-width: 560px) {
  .vdt-wos-hero__state-row {
    grid-template-columns: 1fr;
  }

  .vdt-wos-hero__result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .vdt-wos-hero__state-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

