:root {
  --bg: #0b0b0b;
  --card: #111;
  --line: #2e2e2e;
  --text: #f5f5f5;
  --muted: #b8b8b8;
  --accent: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(circle at top, #1a1a1a, #080808);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}
.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 16px;
}
.card {
  background: linear-gradient(160deg, #111, #181818);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.hero h1 {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: "Baskerville", "Times New Roman", "STSong", "Songti SC", serif;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.4px;
  line-height: 1.15;
}
.hero p {
  margin: 0;
  color: var(--muted);
}
a {
  color: #ddd;
}
.lang-row {
  display: flex;
  justify-content: flex-end;
}
.mini {
  padding: 4px 8px;
  font-size: 12px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #ddd;
  margin-top: 8px;
}
textarea {
  min-height: 44px;
  max-height: 220px;
  resize: none;
  overflow: visible;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  background: #0d0d0d;
  color: #f3f3f3;
  padding: 10px 12px;
  line-height: 1.45;
  font-size: 14px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    filter 0.2s;
}
textarea:focus {
  outline: none;
  border-color: #696969;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.08),
    0 0 12px rgba(255, 255, 255, 0.12);
  filter: brightness(1.04);
  animation: whiteFocusPulse 1.8s ease-in-out infinite;
}
.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.mode-head h2 {
  margin: 0;
}
#modeRow {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  padding: 8px;
  border: 1px dashed #4a4a4a;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
#modeRow::-webkit-scrollbar {
  display: none;
}
#toggleDeleteMode.active {
  border-color: #b36b6b;
  color: #ffd9d9;
  box-shadow: 0 0 0 1px rgba(255, 120, 120, 0.18) inset;
}
#modeRow.delete-on {
  border-color: #8b5454;
  background: linear-gradient(
    180deg,
    rgba(120, 40, 40, 0.18),
    rgba(120, 40, 40, 0.08)
  );
  box-shadow: 0 0 0 1px rgba(200, 110, 110, 0.16) inset;
}
.danger-toggle {
  white-space: nowrap;
  flex: 0 0 auto;
}
.wheel-wrap {
  position: relative;
}
.example-wheel {
  position: absolute;
  left: 0;
  top: 42px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px;
  border: 1px solid #4a4a4a;
  border-radius: 12px;
  background: #0d0d0d;
  z-index: 20;
  min-width: 220px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.wheel-opt {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #5a5a5a;
  background: #141414;
  color: #efefef;
  box-shadow: none;
  font-weight: 600;
}
.wheel-opt:hover {
  background: #1d1d1d;
  border-color: #8a8a8a;
}
.wheel-opt-exp {
  border-color: #a36aa0;
  color: #ffd7f7;
  background: linear-gradient(180deg, #201521, #171018);
}
.wheel-opt-exp:hover {
  border-color: #d08bcb;
  background: linear-gradient(180deg, #2a1a2b, #1d1320);
}
.example-wheel.hidden {
  display: none;
}
.flow-nav {
  padding: 0;
  margin: 0 0 10px;
}
.flow-title {
  font-size: 12px;
  color: #f3f6ff;
  margin: 0 0 6px;
  font-weight: 700;
  padding: 6px 10px;
  border: 1px solid #4f5563;
  border-radius: 10px;
  background: rgba(19, 22, 27, 0.74);
  backdrop-filter: blur(8px);
}
.sticky-title {
  position: sticky;
  top: 8px;
  z-index: 100;
}
.flow-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.flow-item {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid #8e939f;
  border-radius: 999px;
  color: #e8ebf3;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
}
.flow-item.current {
  border-color: #ffffff;
  background: linear-gradient(180deg, #ffffff, #eceff5);
  color: #14161b;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.3),
    0 10px 18px rgba(255, 255, 255, 0.18);
}
button {
  border: 1px solid #8e939f;
  background: linear-gradient(135deg, #ffffff, #eceff5);
  color: #14161b;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition:
    0.16s transform,
    0.2s box-shadow,
    0.2s filter;
  box-shadow: 0 6px 14px rgba(255, 255, 255, 0.2);
}
button:hover {
  filter: brightness(1.04);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.24);
}
button:active {
  transform: translateY(1px) scale(0.99);
}
button.ghost {
  background: transparent;
  color: #e8ebf3;
  border: 1px solid #8e939f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
#loadPharosCase.tap-pop {
  animation: tapPop 0.24s ease;
}
@keyframes tapPop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(0.97);
  }
  100% {
    transform: scale(1);
  }
}
.chip {
  border: 1px solid #4a4a4a;
  background: #111;
  color: #eee;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.chip.active {
  background: #fff;
  color: #000;
}
.chip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    0.2s border-color,
    0.2s box-shadow,
    0.2s background;
  flex: 0 0 auto;
}
.chip-wrap.active {
  border-color: #5e5e5e;
  background: rgba(255, 255, 255, 0.04);
}
.chip-del {
  padding: 0;
  width: 22px;
  height: 22px;
  line-height: 20px;
  border-radius: 999px;
  border: 1px solid #4c4c4c;
  background: #141414;
  color: #e8e8e8;
  box-shadow: none;
  font-weight: 600;
}
.chip-del:hover {
  border-color: #8d8d8d;
  background: #1e1e1e;
  box-shadow: none;
}
.add-chip {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #cfd3da;
  background: linear-gradient(180deg, #ffffff, #f2f4f8);
  color: #161a22;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 6px 12px rgba(0, 0, 0, 0.24);
  animation: addPulse 2.4s ease-in-out infinite;
  flex: 0 0 auto;
}
.add-chip:hover {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 8px 14px rgba(0, 0, 0, 0.3);
  filter: brightness(1.02);
}
@keyframes addPulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.22),
      0 6px 12px rgba(0, 0, 0, 0.24);
  }
  50% {
    transform: translateY(-1px);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.28),
      0 8px 14px rgba(0, 0, 0, 0.28);
  }
}
.hidden {
  display: none;
}
pre {
  white-space: pre-wrap;
  background: #0b0b0b;
  border: 1px solid #2f2f2f;
  border-radius: 10px;
  padding: 10px;
  max-height: 360px;
  overflow: auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #121212;
  color: #f2f2f2;
  border: 1px solid #6a6a6a;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  z-index: 120;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.toast.hidden {
  display: none;
}
@keyframes whiteFocusPulse {
  0%,
  100% {
    filter: brightness(1.02);
  }
  50% {
    filter: brightness(1.06);
  }
}
