/* Alonzo-De Ocera Fam — shared komiks print system */

:root {
  --ink: #141414;
  --paper: #fdfdf9;
  --yellow: #f6d81c;
  --red: #e4322b;
  --blue: #1d63c8;
  --cyan: #18a7d8;
  --magenta: #e0307a;
  --green: #2f8f4e;

  --gutter: clamp(8px, 1.1vw, 14px);
  --rule: 4px;
  --rule-thick: 6px;

  --f-mast: "Bowlby One", "Arial Black", sans-serif;
  --f-letter: "Patrick Hand", "Comic Sans MS", sans-serif;

  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-letter);
  font-size: 1.25rem;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1; text-wrap: balance; }
p { margin: 0 0 .8em; text-wrap: pretty; }
button { font: inherit; color: inherit; cursor: pointer; }

::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 2px; }
html { scrollbar-color: var(--ink) var(--yellow); }
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: var(--yellow); }
::-webkit-scrollbar-thumb { background: var(--ink); border: 3px solid var(--yellow); }

.nw { white-space: nowrap; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

/* ---------- print textures ---------- */
.halftone {
  --dot: rgba(20, 20, 20, .22);
  --dot-size: 7px;
  background-image: radial-gradient(circle at center, var(--dot) 28%, transparent 31%);
  background-size: var(--dot-size) var(--dot-size);
}
.halftone-fade {
  -webkit-mask-image: linear-gradient(160deg, #000 10%, transparent 80%);
          mask-image: linear-gradient(160deg, #000 10%, transparent 80%);
}

/* ---------- lettering ---------- */
.balloon {
  position: relative;
  display: inline-block;
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 48% 52% 50% 50% / 55% 50% 50% 45%;
  padding: .8em 1.3em;
  font-family: var(--f-letter);
  line-height: 1.25;
  text-align: center;
}
.balloon::after {
  /* tail: white fill covers the balloon's border where they join */
  content: "";
  position: absolute;
  left: var(--tail-x, 30%);
  bottom: -26px;
  width: 30px; height: 29px;
  background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 29'%3E%3Cpath d='M1 0 L6 27 L29 0' fill='%23fff' stroke='%23141414' stroke-width='3' stroke-linejoin='round'/%3E%3Crect x='0' y='0' width='30' height='2' fill='%23fff'/%3E%3C/svg%3E");
}
.balloon--up::after { bottom: auto; top: -26px; transform: scaleY(-1); }
.balloon--whisper { border-style: dashed; }

.caption {
  display: inline-block;
  background: var(--yellow);
  border: 3px solid var(--ink);
  padding: .35em .7em;
  font-family: var(--f-letter);
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.15;
}

/* ---------- the ink-outlined cutout ---------- */
.figure {
  filter: url(#ink-outline);
}

/* ---------- trait SFX lettering: one voice per person ---------- */
.sfx {
  --sfx-size: 2.6rem;
  --stroke: 7px;
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  font-size: var(--sfx-size);
  line-height: .95;
  white-space: nowrap;
  color: var(--yellow);
  -webkit-text-stroke: var(--stroke) var(--ink);
  paint-order: stroke fill;
}
.sfx .l { display: inline-block; }

/* Prepared: stencil on caution tape */
.sfx--bag {
  font-family: "Saira Stencil One", sans-serif;
  color: var(--ink); -webkit-text-stroke: 0;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, var(--ink) 14px 22px);
  padding: .18em .22em;
  border: 3px solid var(--ink);
  transform: rotate(-3deg);
}
.sfx--bag .sfx__word { background: var(--yellow); padding: 0 .2em; letter-spacing: .06em; }

/* Chill: lazy lowercase, letters drifting */
.sfx--relax {
  font-family: "Gochi Hand", cursive;
  text-transform: lowercase;
  color: #9fd7ff; --stroke: 6px;
  font-size: calc(var(--sfx-size) * 1.05);
}
.sfx--relax .l { transform: translateY(calc(sin(var(--i) * 1.1rad) * 6px)) rotate(calc(var(--i) * 2deg)); }
.sfx--relax::after { content: "z z"; font-size: .45em; margin-left: .2em; align-self: flex-start; letter-spacing: .1em; }

/* Organized: one letter per tile, perfectly aligned */
.sfx--lista {
  font-family: "Rubik Mono One", monospace;
  color: var(--ink); -webkit-text-stroke: 0;
  font-size: calc(var(--sfx-size) * .52);
  gap: 3px;
}
.sfx--lista .l {
  width: 1.55em; height: 1.75em; line-height: 1.75em; text-align: center;
  background: #fff; border: 3px solid var(--ink);
}
.sfx--lista .l:first-child { background: var(--yellow); }

/* Foodie: chewy, saucy, steaming */
.sfx--busog {
  font-family: "Chewy", cursive;
  color: #ff8a1f;
  font-size: calc(var(--sfx-size) * 1.1);
}
.sfx--busog .l:nth-child(odd) { color: var(--red); }
.sfx--busog::before {
  content: "";
  position: absolute; left: 50%; top: -0.55em; width: 1.2em; height: .5em; translate: -50% 0;
  background:
    radial-gradient(circle at 15% 70%, transparent 34%, var(--ink) 36% 46%, transparent 48%) 0 0 / 33% 100% repeat-x;
  opacity: .8;
}

/* Playful: every letter jumps a different way */
.sfx--totoy { font-family: "Luckiest Guy", sans-serif; font-size: calc(var(--sfx-size) * 1.05); }
.sfx--totoy .l:nth-child(4n+1) { color: var(--yellow); transform: rotate(-9deg) translateY(-4px); }
.sfx--totoy .l:nth-child(4n+2) { color: #3fd06b; transform: rotate(7deg) translateY(3px); }
.sfx--totoy .l:nth-child(4n+3) { color: #ff5fa2; transform: rotate(-4deg) translateY(-8px); }
.sfx--totoy .l:nth-child(4n+4) { color: #36b6ff; transform: rotate(10deg); }

/* Stylish: magazine cover line */
.sfx--ganda {
  font-family: "Bodoni Moda", serif; font-style: italic; font-weight: 900;
  color: var(--ink); -webkit-text-stroke: 0;
  background: #fff; padding: .05em .35em .12em;
  border-bottom: 5px solid var(--ink);
  letter-spacing: -.02em;
}

/* Loving: written inside a heart */
.sfx--nanay {
  font-family: "Cookie", cursive;
  color: #fff; -webkit-text-stroke: 0;
  font-size: calc(var(--sfx-size) * 1.05);
  padding: .5em .7em .75em;
  background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 100' preserveAspectRatio='none'%3E%3Cpath d='M60 96C26 70 4 52 4 29 4 14 16 4 31 4c12 0 22 7 29 18C67 11 77 4 89 4c15 0 27 10 27 25 0 23-22 41-56 67z' fill='%23e4322b' stroke='%23141414' stroke-width='4'/%3E%3C/svg%3E");
}

/* Charming: pink script with drawn sparkles */
.sfx--pogi {
  font-family: "Yellowtail", cursive;
  color: #ff7ab8; --stroke: 6px;
  font-size: calc(var(--sfx-size) * 1.1);
  padding: 0 .55em;
  background:
    no-repeat left 0 top 10% / .5em .5em url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0C11 7 13 9 20 10 13 11 11 13 10 20 9 13 7 11 0 10 7 9 9 7 10 0z' fill='%23fff' stroke='%23141414' stroke-width='1.4'/%3E%3C/svg%3E"),
    no-repeat right 0 bottom 15% / .38em .38em url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0C11 7 13 9 20 10 13 11 11 13 10 20 9 13 7 11 0 10 7 9 9 7 10 0z' fill='%23f6d81c' stroke='%23141414' stroke-width='1.4'/%3E%3C/svg%3E");
}

/* Hardworking: blasted out of an explosion */
.sfx--tatay {
  font-family: "Black Ops One", sans-serif;
  color: #fff; --stroke: 6px;
  font-size: calc(var(--sfx-size) * .78);
  padding: .9em 1.1em;
  background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100' preserveAspectRatio='none'%3E%3Cpath d='M100 2l12 22 26-16-4 26 34-8-18 22 46 4-40 14 30 20-38-4 8 30-30-20-14 26-12-26-22 24 2-30-36 12 20-24L6 74l32-16L2 44l40-4L22 12l34 12 8-22 18 20z' fill='%23e4322b' stroke='%23141414' stroke-width='3'/%3E%3Cpath d='M100 22l8 14 18-8-2 16 22-2-12 14 26 6-26 8 14 14-22-4 2 18-18-14-10 16-8-16-16 14 2-18-22 4 14-14-26-8 26-6-12-14 22 2-2-16 18 8z' fill='%23f6d81c'/%3E%3C/svg%3E");
  letter-spacing: .03em;
}

/* Gentle: a soft whisper, no outline */
.sfx--hinhin {
  font-family: "Comfortaa", sans-serif;
  text-transform: lowercase;
  color: #42607a; -webkit-text-stroke: 0;
  font-size: calc(var(--sfx-size) * .72);
  background: #fff;
  border: 2px dashed #42607a;
  border-radius: 999px;
  padding: .35em .9em;
  letter-spacing: .12em;
}

/* Dramatic: shaded, shaking, too big for the room */
.sfx--ineng {
  font-family: "Bungee Shade", sans-serif;
  color: var(--ink); -webkit-text-stroke: 0;
  font-size: calc(var(--sfx-size) * 1.05);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpath d='M2 8 14 2 40 7 68 1 100 6 132 1 164 7 198 3 192 30 198 56 166 52 136 59 104 53 72 59 40 53 12 58 4 50 8 30z' fill='%23ffffff' stroke='%23141414' stroke-width='2.5' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  padding: .3em .55em;
}
.sfx--ineng .l:nth-child(odd) { transform: translateY(2px) rotate(-2deg); }

/* Sweet: candy lettering */
.sfx--puso {
  font-family: "Shrikhand", cursive;
  color: #ffb3d1;
  font-size: calc(var(--sfx-size) * .95);
}
.sfx--puso .l:nth-child(even) { color: #fff; }

/* Funny: inside a gag starburst */
.sfx--joke {
  font-family: "Bangers", sans-serif;
  color: var(--yellow); --stroke: 6px;
  letter-spacing: .04em;
  font-size: calc(var(--sfx-size) * 1.05);
  transform: rotate(-6deg);
}
.sfx--joke::after { content: "!"; color: var(--red); margin-left: .05em; }

/* Patient: typed out, one key at a time */
.sfx--pasensya {
  font-family: "Special Elite", monospace;
  color: var(--ink); -webkit-text-stroke: 0;
  font-size: calc(var(--sfx-size) * .72);
  background: #fff;
  border: 3px solid var(--ink);
  padding: .3em .6em;
}
.sfx--pasensya::after { content: "_"; animation: blink 1.1s steps(1) infinite; }

/* Giggly: bubbles */
.sfx--bunso {
  font-family: "Rubik Bubbles", sans-serif;
  color: #7fd3ff; --stroke: 5px;
  font-size: calc(var(--sfx-size) * 1.05);
}
.sfx--bunso .l:nth-child(odd) { color: var(--yellow); transform: translateY(-5px); }

@keyframes blink { 50% { opacity: 0; } }

/* ---------- issue chrome (personal pages) ---------- */
.issue-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .55rem clamp(.8rem, 3vw, 2rem);
  background: var(--yellow);
  border-bottom: var(--rule) solid var(--ink);
}
.back-link {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--f-mast);
  font-size: clamp(.85rem, 1.6vw, 1.05rem);
  text-decoration: none;
  text-transform: uppercase;
  background: #fff;
  border: 3px solid var(--ink);
  padding: .35em .8em .35em .55em;
  transition: background .2s var(--ease-out), transform .2s var(--ease-out);
}
.back-link svg { width: 1.3em; height: 1.3em; flex: none; }
.back-link:hover { background: var(--ink); color: var(--yellow); transform: translateX(-3px); }
.issue-bar__mast {
  font-family: var(--f-mast);
  font-size: clamp(.8rem, 1.5vw, 1rem);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--red);
  text-shadow: 2px 2px 0 var(--blue);
  white-space: nowrap;
}
.issue-bar__no { font-size: 1rem; white-space: nowrap; }

.next-issues {
  display: flex; flex-wrap: wrap; align-items: stretch; justify-content: space-between; gap: var(--gutter);
  padding: var(--gutter);
  background: var(--ink);
}
.next-issues a {
  flex: 1 1 14rem;
  display: flex; flex-direction: column; gap: .2rem;
  background: var(--paper);
  padding: 1rem 1.2rem;
  text-decoration: none;
  transition: background .2s var(--ease-out);
}
.next-issues a:hover { background: var(--yellow); }
.next-issues small { font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; }
.next-issues strong { font-family: var(--f-mast); font-weight: 400; font-size: 1.35rem; line-height: 1.1; }
.next-issues .home { background: var(--red); color: #fff; justify-content: center; }
.next-issues .home:hover { background: var(--yellow); color: var(--ink); }

.wallword {
  /* street-poster raise: the trait at wall scale, cropped by the panel */
  position: absolute;
  pointer-events: none;
  line-height: .8;
  white-space: nowrap;
  user-select: none;
}

.placeholder-note {
  margin: 0; padding: 1rem clamp(1rem, 3vw, 2rem);
  background: var(--ink); color: #d9d9d4;
  font-size: 1rem; text-align: center;
}
.placeholder-note code { color: var(--yellow); font-family: inherit; }

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

.back-link { white-space: nowrap; }
@media (max-width: 600px) {
  .issue-bar__mast { display: none; }
}
