/* FusionFall Forever wiki: the Codes page only (linked from /wiki/features/codes). Uses the theme's palette and fonts. */
.ffw{--ffc-works:#7ee000;--ffc-partly:#ffd23d;--ffc-off:#ff8a7a}

/* ---- at a glance: the counts are also the status filter */
.ffc-stats{display:grid;gap:.6rem;grid-template-columns:repeat(2,minmax(0,1fr))}
.ffc-stat{--c:var(--color-ff-glow,#7fe4ff);position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:.1rem;min-height:4.6rem;
  padding:.6rem .8rem .55rem 1.05rem;border:1px solid color-mix(in srgb,var(--c) 45%,transparent);border-radius:6px;cursor:pointer;text-align:left;color:var(--c);
  background:linear-gradient(135deg,color-mix(in srgb,var(--c) 14%,#0d3a56) 0,#061e2df2 70%);font:inherit;
  box-shadow:inset 0 1px #bef0ff26,0 6px 16px -10px #000;transition:border-color .13s,box-shadow .13s,transform .13s}
.ffc-stat::before{content:"";position:absolute;left:0;top:8px;bottom:8px;width:5px;border-radius:0 3px 3px 0;background:var(--c);
  clip-path:polygon(0 0,100% 4px,100% calc(100% - 4px),0 100%)}
.ffc-stat b{font-family:var(--font-display,"Jefferies",sans-serif);font-weight:400;font-size:1.9rem;line-height:1;color:#fff;
  text-shadow:0 0 12px color-mix(in srgb,var(--c) 70%,transparent),0 2px #031e2e}
.ffc-stat span{font-family:var(--font-display,"Jefferies",sans-serif);text-transform:uppercase;letter-spacing:.06em;font-size:.72rem}
.ffc-stat:hover{border-color:var(--c);box-shadow:0 0 18px -6px var(--c)}
.ffc-stat:active{transform:translateY(1px)}
.ffc-stat.is-on{border-color:var(--c);box-shadow:inset 0 0 0 1px var(--c),0 0 20px -6px var(--c)}
.ffc-stat.is-works{--c:var(--ffc-works)}.ffc-stat.is-partly{--c:var(--ffc-partly)}.ffc-stat.is-off{--c:var(--ffc-off)}
.ffc-legend{display:grid;gap:.35rem;margin:.9rem 0 0!important;font-size:.86rem;color:#d6f4ffd0}
.ffc-legend li{display:flex;align-items:baseline;gap:.5rem}
.ffc-legend .ffc-st{flex:none;min-width:7.6rem;justify-content:center}

/* status chip */
.ffc-st{--c:var(--color-ff-glow,#7fe4ff);display:inline-flex;align-items:center;gap:.35rem;font-family:var(--font-display,"Jefferies",sans-serif);text-transform:uppercase;
  letter-spacing:.05em;font-size:.66rem;line-height:1.5;padding:.05rem .5rem;border:1px solid color-mix(in srgb,var(--c) 55%,transparent);border-radius:999px;
  color:var(--c);background:color-mix(in srgb,var(--c) 12%,transparent);white-space:nowrap}
.ffc-st::before{content:"";width:.45rem;height:.45rem;border-radius:50%;background:var(--c);box-shadow:0 0 6px var(--c)}
.ffc-st.is-works{--c:var(--ffc-works)}.ffc-st.is-partly{--c:var(--ffc-partly)}.ffc-st.is-off{--c:var(--ffc-off)}

/* ---- how to redeem: the game's chat box */
.ffc-how{display:grid;gap:1rem;align-items:center}
.ffc-chat{border-radius:6px;padding:.6rem;background:radial-gradient(120% 140% at 0 0,#1d4d6a66,#0000 60%),#02131a99;border:1px solid var(--ffw-line)}
.ffc-chat p{margin:0}
.ffc-chat-log{padding:.2rem .3rem .55rem;font-size:.85rem;background:linear-gradient(#0000,#0b1b2580);border-radius:4px 4px 0 0}
.ffc-chat-sys{color:#ffe46b;text-shadow:0 1px #000}
.ffc-chat-sys::before{content:"[System] ";color:#ffd23dcc}
.ffc-chat-bar{display:flex;align-items:stretch;gap:0;min-height:2.6rem;border:2px solid #19c6ef;border-radius:5px;background:#07141c;
  box-shadow:inset 0 0 0 1px #0b3446,0 0 14px -4px #19c6efa6;overflow:hidden}
.ffc-chat-tab{flex:none;display:flex;align-items:center;padding:0 1.1rem 0 .7rem;font-family:var(--font-display,"Jefferies",sans-serif);
  text-transform:uppercase;font-size:.72rem;letter-spacing:.06em;color:#e6faff;background:linear-gradient(#1494bd,#0b6f93);
  clip-path:polygon(0 0,calc(100% - 10px) 0,100% 50%,calc(100% - 10px) 100%,0 100%)}
.ffc-chat-in{flex:1;min-width:0;display:flex;align-items:center;padding:0 .7rem;font-family:var(--font-mono,monospace);font-size:.95rem;color:#fff;
  white-space:nowrap;overflow:hidden}
.ffc-caret{display:inline-block;width:2px;height:1.1em;margin-left:2px;background:#7fe4ff;animation:ffc-blink 1.1s steps(1) infinite}
@keyframes ffc-blink{50%{opacity:0}}
.ffc-steps{counter-reset:ffc;display:grid;gap:.55rem;margin:0!important}
.ffc-steps li{counter-increment:ffc;position:relative;padding:.2rem 0 0 2.6rem;min-height:1.9rem;font-size:.93rem;line-height:1.5;color:#d6f4ffd9}
.ffc-steps li::before{content:counter(ffc);position:absolute;left:0;top:0;width:1.9rem;height:1.9rem;display:grid;place-items:center;border-radius:50%;
  border:1px solid var(--ffw-line2);background:#0d3a5699;font-family:var(--font-display,"Jefferies",sans-serif);font-size:.85rem;color:var(--color-ff-glow,#7fe4ff)}
.ffc-steps b{color:#fff;font-weight:700}
.ffw code,.ffw kbd{font-family:var(--font-mono,monospace);font-size:.9em;padding:.05rem .3rem;border-radius:3px;background:#02131acc;border:1px solid var(--ffw-line);color:#e6faff}

/* ---- the list */
.ffc-bar{background:linear-gradient(#0a3149,#07283c)}
.ffc-bar .ff-filters{display:flex;gap:.6rem}
.ffw-filters.ffc-bar .ff-filters>.ff-input:first-of-type{flex:1 1 9rem;min-width:0}
.ffw-filters.ffc-bar .ff-filters>select.ff-input{flex:0 1 11rem;min-width:8.5rem}
.ffc-jumps{display:flex;flex-wrap:wrap;gap:.35rem;margin:0 0 1.1rem}
.ffc-plate .ffw-note.is-warn{margin:0 0 .8rem}
.ffc-jumps .ffw-chip{min-height:2rem;gap:.35rem}
.ffc-jumps .ffw-chip small{font-family:var(--font-sans,sans-serif);color:#d6f4ff99;font-size:.72rem}
.ffc-jumps .ffw-chip:hover{border-color:var(--color-ff-glow,#7fe4ff);background:#39c4ee2e}
.ffc-group .ffw-h3 small{font-family:var(--font-sans,sans-serif);font-size:.75rem;color:#d6f4ff99;margin-left:.3rem}
.ffc-grid{display:grid;gap:.6rem;grid-template-columns:minmax(0,1fr);align-items:start}
/* packed by wiki-codes.js: cards go into the shortest column, in order (without the script: the grid above) */
.ffc-grid.is-packed{display:block;position:relative}
.ffc-grid.is-packed>.ffc-card{position:absolute;top:0;left:0}
.ffc-card{--c:var(--ffc-works);position:relative;display:flex;flex-direction:column;gap:.4rem;min-width:0;padding:.65rem .7rem .7rem;border:1px solid var(--ffw-line2);border-radius:6px;
  background:linear-gradient(#0d3a56e6,#061e2df2);box-shadow:inset 0 1px #bef0ff1f}
.ffc-card::before{content:"";position:absolute;left:10px;right:10px;top:-1px;height:3px;border-radius:0 0 3px 3px;background:var(--c);opacity:.85;
  box-shadow:0 0 10px -1px var(--c)}
.ffc-card.is-partly{--c:var(--ffc-partly)}
.ffc-card.is-off{--c:var(--ffc-off);background:linear-gradient(#0b2c40d9,#061a26f2);border-color:var(--ffw-line)}
.ffc-top{display:flex;align-items:center;gap:.6rem;min-height:2.5rem}
.ffc-code{flex:1;min-width:0;font-family:var(--font-mono,monospace);font-size:1.05rem;letter-spacing:.02em;color:#fff;padding:.3rem .5rem;border-radius:4px;
  background:#02131ae6;border:1px solid #39c4ee4d;overflow-wrap:anywhere;user-select:all;-webkit-user-select:all}
.ffc-card.is-off .ffc-code{color:#d6f4ffb3}
.ffc-copy{flex:none;min-height:2.5rem;min-width:5.6rem;cursor:pointer;font-size:.72rem;color:#fff;letter-spacing:.06em;padding:.3rem .8rem;border-radius:4px;
  font-family:var(--font-display,"Jefferies",sans-serif);text-transform:uppercase;display:inline-flex;align-items:center;justify-content:center;gap:.4rem;
  transform:skew(-12deg);text-shadow:0 1px #04283ce6;background:linear-gradient(#4cc4ee,#1a83b9 52%,#0c4f73);border:1px solid #a0ebffe6;box-shadow:inset 0 1px #dcfaff66;
  transition:filter .12s,box-shadow .2s}
.ffc-copy>*{transform:skew(12deg)}
.ffc-copy:hover{filter:brightness(1.15);box-shadow:inset 0 1px #ebfcffbf,0 0 16px -4px #39c4eef2}
.ffc-copy:active{filter:brightness(.95)}
.ffc-copy-ic{width:.8rem;height:.9rem;position:relative}
.ffc-copy-ic::before,.ffc-copy-ic::after{content:"";position:absolute;width:.58rem;height:.7rem;border:1.5px solid currentColor;border-radius:2px}
.ffc-copy-ic::before{left:0;top:0;opacity:.6}
.ffc-copy-ic::after{left:.22rem;top:.2rem;background:#1a83b9}
.ffc-copy.is-done{background:linear-gradient(#b6f53c,#5dc400 48%,#2f8c00);border-color:#d6ff8ce6;color:#10330a;text-shadow:0 1px #e6ffc899}
.ffc-copy.is-done .ffc-copy-ic{display:none}
.ffc-meta{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem .6rem;margin:0}
.ffc-when{min-width:0;font-size:.78rem;line-height:1.35;color:#8fd6efcc}
.ffc-when b{color:#e6faff;font-weight:700;margin-right:.3rem}
.ffc-src{margin:0;font-size:.9rem;line-height:1.6;color:#d6f4ffd0;max-width:60rem}
.ffc-src a{color:var(--color-ff-cyan,#39c4ee);text-decoration:underline;text-underline-offset:2px}
.ffc-src a:hover{color:var(--color-ff-glow,#7fe4ff)}
/* rewards: small tiles, two or three to a line */
.ffc-rewards{display:grid;gap:.3rem;grid-template-columns:repeat(auto-fill,minmax(9.25rem,1fr))}
.ffc-rewards li{display:flex;align-items:center;gap:.45rem;min-width:0;min-height:42px;padding:.2rem .35rem .2rem .2rem;border:1px solid transparent;border-radius:4px;background:#041c2566}
.ffc-rewards .ffw-ic{width:32px;height:32px}
.ffc-rt{min-width:0;flex:1}
.ffc-rt b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:400;font-size:.8rem;line-height:1.2;color:var(--color-ff-glow,#7fe4ff);overflow-wrap:anywhere}
.ffc-rt b a{text-decoration:underline;text-decoration-color:#7fe4ff66;text-underline-offset:2px}
.ffc-rt b a:hover{color:#fff;text-decoration-color:#fff}
.ffc-rt i{display:block;font-style:normal;font-size:.66rem;line-height:1.3;color:#8fd6efb3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ffc-x{font-style:normal;font-family:var(--font-display,"Jefferies",sans-serif);font-size:.66rem;color:#fff;margin-left:.3rem;padding:0 .25rem;border-radius:3px;background:#39c4ee40}
.ffc-rewards li.is-off{background:none;border-style:dashed;border-color:#39c4ee33}
.ffc-rewards li.is-off b{color:#d6f4ff99;text-decoration:line-through;text-decoration-color:#ff8a7a99}
.ffc-rewards li.is-off i{color:#ff8a7acc}
.ffc-note{margin:0;font-size:.76rem;line-height:1.4;color:var(--ffw-dim)}
/* long sets: the first five, then "+N more" (the script folds them; without it every reward shows) */
.ffc-card.is-folded.is-ready:not(.is-open) .ffc-rewards>.is-more{display:none}
[data-ffc-list].is-finding .ffc-card .ffc-rewards>.is-more{display:flex!important}
[data-ffc-list].is-finding .ffc-more-li{display:none}
.ffc-rewards.is-one{grid-template-columns:minmax(0,1fr)}
.ffc-rewards>.ffc-more-li{background:none;border:0;padding:0}
.ffc-more{min-height:2rem;padding:.15rem .8rem;border:1px solid var(--ffw-line2);border-radius:999px;background:#0d3a5680;cursor:pointer;
  font-family:var(--font-display,"Jefferies",sans-serif);text-transform:uppercase;letter-spacing:.05em;font-size:.68rem;color:var(--color-ff-glow,#7fe4ff)}
.ffc-more:hover{border-color:var(--color-ff-glow,#7fe4ff);background:#39c4ee2e}
.ffc-empty{margin:.5rem 0 0;padding:1rem;text-align:center;border:1px dashed var(--ffw-line2);border-radius:6px;color:var(--ffw-dim)}
.ffc-toast{position:fixed;left:50%;bottom:1.2rem;z-index:60;transform:translate(-50%,1rem);opacity:0;pointer-events:none;padding:.55rem 1rem;border-radius:6px;
  background:#062236;border:1px solid #7ee000b3;color:#e9ffd0;font-size:.9rem;text-align:center;box-shadow:0 10px 26px -6px #000;transition:opacity .18s,transform .18s;width:max-content;max-width:calc(100vw - 2rem)}
.ffc-toast.is-on{opacity:1;transform:translate(-50%,0)}

@media (min-width:40rem){
  .ffc-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
  .ffc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ffc-legend li{align-items:center}
}
@media (min-width:56rem){
  .ffc-how{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:1.5rem}
}
@media (min-width:72rem){
  .ffc-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:39.99rem){
  .ffc-legend li{flex-direction:column;gap:.15rem}
  .ffc-legend .ffc-st{min-width:0}
  .ffc-code{font-size:1rem}
  /* the group chips scroll sideways instead of filling the screen */
  .ffc-jumps{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;margin:0 -1rem 1rem;padding:0 1rem .1rem}
  .ffc-jumps::-webkit-scrollbar{display:none}
  .ffc-jumps .ffw-chip{flex:none}
}
@media (prefers-reduced-motion:reduce){.ffc-caret{animation:none}}
