[hidden] {
  display: none !important;
}

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

.fan-main {
  min-height: 100vh;
  padding-top: calc(var(--nav-h, 72px) + 34px);
  background: radial-gradient(circle at 8% 2%, rgba(244, 122, 164, 0.16), transparent 32%), radial-gradient(circle at 92% 12%, rgba(142, 93, 255, 0.12), transparent 30%), linear-gradient(180deg, #ffffff 0%, #fff9fb 46%, #f8f6f8 100%);
  overflow-x: hidden;
}

.fan-hero {
  padding: 18px 0 24px;
}

.fan-hero-shell {
  max-width: 860px;
  text-align: center;
}

.fan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(244, 122, 164, 0.1);
  color: #b6376f;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fan-hero h1 {
  margin: 16px 0 12px;
  color: var(--ink, #211c28);
  font-size: clamp(2.15rem, 7vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.075em;
  font-weight: 950;
}

.fan-hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted, #6f6877);
  font-size: clamp(0.95rem, 2vw, 1.08rem);
  line-height: 1.8;
  font-weight: 600;
}

.fan-workspace {
  padding: 20px 0 82px;
}

.fan-grid {
  max-width: 1180px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 26px;
  align-items: start;
}

.fan-panel {
  border: 1px solid rgba(37, 27, 43, 0.08);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 28px 86px rgba(37, 27, 43, 0.07);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.fan-settings {
  padding: 22px;
  animation: fanPanelIn 0.58s cubic-bezier(.22, 1, .36, 1) both;
}

.fan-output {
  padding: 26px;
  animation: fanPanelIn 0.68s cubic-bezier(.22, 1, .36, 1) 0.06s both;
}

@keyframes fanPanelIn {
  from { opacity: 0; transform: translateY(20px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.fan-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  margin-bottom: 20px;
  border-radius: 999px;
  border: 1px solid rgba(244, 122, 164, 0.15);
  background: rgba(255, 247, 250, 0.9);
}

.fan-tab {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #7d7480;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(.22, 1, .36, 1), background 0.28s cubic-bezier(.22, 1, .36, 1), color 0.28s cubic-bezier(.22, 1, .36, 1), box-shadow 0.28s cubic-bezier(.22, 1, .36, 1);
}

.fan-tab:hover { color: #211c28; }
.fan-tab.active { color: #b6376f; background: #ffffff; box-shadow: 0 10px 24px rgba(37, 27, 43, 0.08); }
.fan-tab:active { transform: scale(0.985); }

#fan-form,
.fan-panel-mode {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fan-panel-mode {
  animation: fanModeIn 0.42s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes fanModeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fan-block {
  border: 1px solid rgba(37, 27, 43, 0.07);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.88);
  overflow: visible;
}

.fan-block-toggle {
  width: 100%;
  min-height: 72px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: #211c28;
  font: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  text-align: left;
}

.fan-block-toggle > i {
  color: #8a828e;
  transition: transform 0.28s cubic-bezier(.22, 1, .36, 1);
}

.fan-block-toggle[aria-expanded="true"] > i {
  transform: rotate(180deg);
}

.fan-step {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #211c28;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(37, 27, 43, 0.16);
}

.fan-block-title { display: flex; flex-direction: column; gap: 4px; }
.fan-block-title strong { color: #211c28; font-size: 1rem; line-height: 1.25; letter-spacing: -0.03em; font-weight: 950; }
.fan-block-title small { color: #7a727d; font-size: 0.82rem; line-height: 1.35; font-weight: 650; }

.fan-block-body {
  padding: 0 18px 18px;
  animation: fanOpen 0.3s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes fanOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.fan-field-group { display: flex; flex-direction: column; gap: 10px; }
.fan-field-group + .fan-field-group { margin-top: 18px; }
.fan-field-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fan-field-header label { color: #211c28; font-size: 0.92rem; font-weight: 900; }
.fan-hint { color: #928a98; font-size: 0.78rem; font-weight: 750; }

.fan-input-box { position: relative; }
.fan-input-box i { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: #9a929d; pointer-events: none; }

.fan-input-box input,
.fan-select-box select {
  width: 100%;
  height: 54px;
  padding: 0 18px 0 46px;
  border: 1px solid rgba(37, 27, 43, 0.11);
  border-radius: 18px;
  outline: none;
  background: rgba(255, 250, 252, 0.9);
  color: #211c28;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  transition: border-color 0.26s cubic-bezier(.22, 1, .36, 1), box-shadow 0.26s cubic-bezier(.22, 1, .36, 1), background 0.26s cubic-bezier(.22, 1, .36, 1);
}

.fan-input-box input::placeholder { color: #a79faa; font-weight: 650; }
.fan-input-box input:focus,
.fan-select-box select:focus { border-color: rgba(244, 122, 164, 0.72); background: #ffffff; box-shadow: 0 0 0 5px rgba(244, 122, 164, 0.12); }

.fan-select-box { position: relative; }
.fan-select-box::after { content: "\f078"; position: absolute; right: 17px; top: 50%; transform: translateY(-50%); font-family: "Font Awesome 6 Free"; font-weight: 900; color: #8b838f; pointer-events: none; font-size: 0.8rem; }
.fan-select-box select { padding-left: 18px; padding-right: 44px; appearance: none; -webkit-appearance: none; }

.fan-picks { display: flex; flex-wrap: wrap; gap: 10px; }
.fan-picks-stack { display: grid; grid-template-columns: 1fr 1fr; }
.fan-pick { min-height: 48px; padding: 0 15px; border: 1px solid rgba(37, 27, 43, 0.1); border-radius: 16px; background: rgba(255, 255, 255, 0.86); color: #4c4452; font: inherit; font-size: 0.9rem; font-weight: 850; cursor: pointer; transition: transform 0.24s cubic-bezier(.22, 1, .36, 1), border-color 0.24s cubic-bezier(.22, 1, .36, 1), background 0.24s cubic-bezier(.22, 1, .36, 1), color 0.24s cubic-bezier(.22, 1, .36, 1), box-shadow 0.24s cubic-bezier(.22, 1, .36, 1); }
.fan-pick:hover { transform: translateY(-2px); border-color: rgba(244, 122, 164, 0.36); box-shadow: 0 14px 28px rgba(37, 27, 43, 0.055); }
.fan-pick.active { color: #b6376f; border-color: rgba(244, 122, 164, 0.75); background: #fff7fa; box-shadow: 0 12px 28px rgba(244, 122, 164, 0.14); }

.fan-copy-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.fan-copy-mode label { position: relative; cursor: pointer; }
.fan-copy-mode input { position: absolute; opacity: 0; pointer-events: none; }
.fan-copy-mode span { min-height: 46px; padding: 0 16px; border: 1px solid rgba(37, 27, 43, 0.1); border-radius: 999px; background: #ffffff; color: #6f6875; font-size: 0.9rem; font-weight: 900; display: flex; align-items: center; justify-content: center; transition: transform 0.24s cubic-bezier(.22, 1, .36, 1), border-color 0.24s cubic-bezier(.22, 1, .36, 1), background 0.24s cubic-bezier(.22, 1, .36, 1), color 0.24s cubic-bezier(.22, 1, .36, 1), box-shadow 0.24s cubic-bezier(.22, 1, .36, 1); }
.fan-copy-mode label:hover span { transform: translateY(-1px); border-color: rgba(244, 122, 164, 0.36); }
.fan-copy-mode input:checked + span { color: #b6376f; border-color: rgba(244, 122, 164, 0.72); background: #fff7fa; box-shadow: 0 12px 28px rgba(244, 122, 164, 0.13); }

.fan-copy-search-wrap,
.fan-search-box { position: relative; }
.fan-copy-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 80; max-height: 320px; padding: 8px; border: 1px solid rgba(37, 27, 43, 0.1); border-radius: 20px; background: rgba(255, 255, 255, 0.98); box-shadow: 0 22px 54px rgba(37, 27, 43, 0.16); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); overflow-y: auto; animation: fanSearchIn 0.22s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes fanSearchIn { from { opacity: 0; transform: translateY(-6px) scale(0.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.fan-copy-result { width: 100%; min-height: 58px; padding: 10px 12px; border: 0; border-radius: 15px; background: transparent; color: #211c28; font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: background 0.2s cubic-bezier(.22, 1, .36, 1), transform 0.2s cubic-bezier(.22, 1, .36, 1); }
.fan-copy-result:hover { background: rgba(244, 122, 164, 0.1); transform: translateY(-1px); }
.fan-copy-result span { color: #b6376f; font-size: 0.74rem; font-weight: 900; }
.fan-copy-result strong { color: #211c28; font-size: 0.92rem; line-height: 1.45; font-weight: 850; }
.fan-copy-result-empty { padding: 16px; color: #7a727d; font-size: 0.9rem; font-weight: 800; text-align: center; }
.fan-copy-empty { padding: 13px 14px; border-radius: 16px; background: rgba(255, 248, 232, 0.9); border: 1px solid rgba(180, 118, 24, 0.18); color: #6b5122; font-size: 0.82rem; font-weight: 800; line-height: 1.5; }

.fan-control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fan-control { min-height: 74px; padding: 14px; border: 1px solid rgba(37, 27, 43, 0.08); border-radius: 18px; background: rgba(255, 255, 255, 0.8); display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.fan-control span { color: #4a424e; font-size: 0.84rem; font-weight: 850; }
.fan-control input[type="color"] { width: 100%; height: 34px; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.fan-control input[type="range"] { width: 100%; accent-color: #f47aa4; }

.fan-photo-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.fan-upload,
.fan-mini-btn { min-height: 52px; border: 1px solid rgba(37, 27, 43, 0.09); border-radius: 18px; background: #ffffff; color: #211c28; font: inherit; font-size: 0.9rem; font-weight: 900; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform 0.24s cubic-bezier(.22, 1, .36, 1), border-color 0.24s cubic-bezier(.22, 1, .36, 1), box-shadow 0.24s cubic-bezier(.22, 1, .36, 1); }
.fan-upload { padding: 0 18px; overflow: hidden; }
.fan-upload span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fan-mini-btn { padding: 0 16px; }
.fan-upload:hover,
.fan-mini-btn:hover { transform: translateY(-2px); border-color: rgba(244, 122, 164, 0.34); box-shadow: 0 14px 30px rgba(37, 27, 43, 0.06); }
.fan-check { margin-top: 12px; padding: 14px; border: 1px solid rgba(244, 122, 164, 0.16); border-radius: 18px; background: rgba(255, 247, 250, 0.82); display: grid; grid-template-columns: auto 1fr; gap: 10px; color: #5f5663; font-size: 0.82rem; line-height: 1.65; font-weight: 650; cursor: pointer; }
.fan-check input { margin-top: 5px; accent-color: #f47aa4; }
.fan-lock-note,
.fan-format-note { margin-top: 12px; padding: 14px; border: 1px solid rgba(180, 118, 24, 0.18); border-radius: 18px; background: rgba(255, 248, 232, 0.9); color: #6b5122; font-size: 0.82rem; line-height: 1.65; font-weight: 700; }
.fan-lock-note { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.fan-format-note { display: flex; flex-direction: column; gap: 6px; }
.fan-help-btn { width: 30px; height: 30px; border: 0; border-radius: 999px; background: #211c28; color: #ffffff; cursor: pointer; display: grid; place-items: center; transition: transform 0.24s cubic-bezier(.22, 1, .36, 1), box-shadow 0.24s cubic-bezier(.22, 1, .36, 1); }
.fan-help-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(37, 27, 43, 0.16); }

.fan-actions-main { display: flex; margin-top: 4px; }
.fan-btn { min-height: 52px; border: 0; border-radius: 18px; font: inherit; font-size: 0.95rem; font-weight: 950; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: transform 0.26s cubic-bezier(.22, 1, .36, 1), box-shadow 0.26s cubic-bezier(.22, 1, .36, 1), background 0.26s cubic-bezier(.22, 1, .36, 1), opacity 0.26s cubic-bezier(.22, 1, .36, 1); }
.fan-btn:active { transform: scale(0.985); }
.fan-btn:disabled { cursor: not-allowed; opacity: 0.48; transform: none; box-shadow: none; }
.fan-btn-primary { width: 100%; color: #ffffff; background: linear-gradient(135deg, #211c28 0%, #3d2b42 52%, #c94f86 100%); box-shadow: 0 18px 40px rgba(87, 40, 68, 0.24); }
.fan-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 24px 50px rgba(87, 40, 68, 0.28); }
.fan-btn-secondary { color: #4e4652; background: #ffffff; border: 1px solid rgba(37, 27, 43, 0.08); }
.fan-btn-secondary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(37, 27, 43, 0.07); }

.fan-sticky-wrapper { position: sticky; top: calc(var(--nav-h, 72px) + 18px); }
.fan-output-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.fan-output-meta span { display: block; margin-bottom: 6px; color: #b6376f; font-size: 0.72rem; font-weight: 950; letter-spacing: 0.12em; text-transform: uppercase; }
.fan-output-meta h2 { margin: 0; color: #211c28; font-size: 1.26rem; line-height: 1.2; letter-spacing: -0.04em; font-weight: 950; }
.fan-output-meta p { margin: 8px 0 0; color: #5e5661; font-size: 0.86rem; font-weight: 800; }
.fan-status-badge { min-height: 34px; padding: 0 14px; border-radius: 999px; background: #e9fbf1; color: #10a861; font-size: 0.76rem; font-weight: 950; text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; }
.fan-status-badge.is-working { background: #fff5dc; color: #b37616; }
.fan-preview-box { position: relative; width: 100%; min-height: 420px; padding: 18px; border: 1px solid rgba(37, 27, 43, 0.08); border-radius: 30px; background: radial-gradient(circle at 50% 24%, rgba(244, 122, 164, 0.08), transparent 42%), linear-gradient(180deg, #ffffff 0%, #fff9fb 100%); display: grid; place-items: center; overflow: hidden; }
.fan-preview-box canvas { width: auto; max-width: 100%; max-height: 620px; display: block; border-radius: 24px; box-shadow: 0 26px 70px rgba(37, 27, 43, 0.16); animation: fanCanvasIn 0.46s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes fanCanvasIn { from { opacity: 0; transform: translateY(12px) scale(0.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.fan-status-overlay { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.78); color: #211c28; font-size: 0.95rem; font-weight: 950; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.fan-status-overlay i { font-size: 1.4rem; }
.fan-actions { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

@media (max-width: 1080px) {
  .fan-grid { grid-template-columns: 1fr; max-width: 760px; }
  .fan-sticky-wrapper { position: static; }
  .fan-preview-box { min-height: 360px; }
  .fan-preview-box canvas { max-height: 560px; }
}

@media (max-width: 760px) {
  .fan-main { padding-top: calc(var(--nav-h, 72px) + 20px); }
  .fan-hero { padding: 8px 0 18px; }
  .fan-workspace { padding-top: 10px; padding-bottom: 56px; }
  .fan-grid { gap: 16px; }
  .fan-settings, .fan-output { padding: 16px; border-radius: 28px; }
  .fan-output { order: -1; }
  .fan-picks-stack, .fan-control-grid, .fan-copy-mode { grid-template-columns: 1fr; }
  .fan-photo-actions { grid-template-columns: 1fr; }
  .fan-mini-btn { width: 100%; }
  .fan-preview-box { min-height: 330px; padding: 14px; border-radius: 26px; }
  .fan-preview-box canvas { max-height: 440px; border-radius: 20px; }
}

@media (max-width: 560px) {
  .fan-hero h1 { font-size: clamp(2.1rem, 13vw, 3.1rem); }
  .fan-hero p { font-size: 0.92rem; }
  .fan-mode-tabs { margin-bottom: 14px; }
  .fan-tab { min-height: 44px; font-size: 0.9rem; }
  .fan-block-toggle { min-height: 66px; padding: 14px; gap: 12px; }
  .fan-block-body { padding: 0 14px 14px; }
  .fan-step { width: 30px; height: 30px; font-size: 0.76rem; }
  .fan-field-header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .fan-actions { grid-template-columns: 1fr; }
  .fan-output-header { align-items: flex-start; flex-direction: column; }
  .fan-copy-results { max-height: 260px; border-radius: 18px; }
}

@media (max-width: 390px) {
  .fan-settings, .fan-output { padding: 12px; border-radius: 24px; }
  .fan-input-box input, .fan-select-box select { height: 50px; }
  .fan-upload, .fan-mini-btn, .fan-btn { min-height: 50px; }
  .fan-preview-box { min-height: 300px; }
}

@media (hover: hover) and (pointer: fine) {
  .fan-tab, .fan-pick, .fan-btn, .fan-upload, .fan-mini-btn, .fan-help-btn, .fan-copy-result { will-change: transform; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

.fan-grid,
.fan-panel,
.fan-settings,
.fan-output,
.fan-preview-box,
.fan-mode-tabs,
.fan-block,
.fan-copy-results {
  min-width: 0;
}

@media (max-width: 1080px) {
  .fan-grid {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .fan-main {
    overflow-x: clip;
  }
  .fan-grid {
    max-width: 100%;
  }
  .fan-mode-tabs {
    border-radius: 24px;
  }
  .fan-tab {
    min-width: 0;
    padding-inline: 8px;
  }
  .fan-picks {
    display: grid;
    grid-template-columns: 1fr;
  }
  .fan-pick,
  .fan-btn,
  .fan-upload,
  .fan-mini-btn {
    width: 100%;
  }
  .fan-preview-box canvas {
    width: 100% !important;
    height: auto !important;
  }
}
