/* ---------- Portfolio: RPG résumé, shop counter, guestbook (js/portfolio.js) ---------- */


/* Shared chunky buttons */
.rpg-btn {
  display: inline-block;
  padding: 10px 18px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--ink);
  font: 700 16px var(--f-round);
  text-decoration: none;
  color: var(--ink);
  background: #fff;
}
.rpg-btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.rpg-btn-hire { background: var(--yellow); }
.rpg-btn-plain { background: #fff; }

/* ===== RPG character sheet ===== */
.rpg-wrap { text-align: center; }
.rpg-title { margin: 0; }
.rpg-title span {
  display: inline-block;
  font: 400 15px/1.6 var(--f-pixel);
  color: #fff;
  background: #1b1340;
  padding: 10px 18px 8px;
  border: 4px solid #fff;
  border-radius: 8px;
  box-shadow: 0 0 0 4px #1b1340, 0 8px 0 4px rgba(43, 26, 82, .25);
}
.rpg-sub { margin: 10px 0 14px; font: 400 21px var(--f-hand); color: var(--ink); text-shadow: 1px 1px 0 #fff; }

.rpg {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 16px;
  text-align: left;
}
/* Dragon Quest-style windows: navy box, white double border */
.rpg-card, .rpg-window {
  background: #1b1340;
  color: #fff;
  border: 4px solid #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 4px #1b1340, 0 10px 0 4px rgba(43, 26, 82, .25);
  padding: 16px;
}
.rpg-portrait {
  width: 132px;
  height: 132px;
  margin: 0 auto 10px;
  border: 4px solid #fff;
  outline: 4px solid var(--pink);
  border-radius: 6px;
  overflow: hidden;
  background: var(--pink-soft);
  display: grid;
  place-items: center;
  font-size: 44px;
}
.rpg-card { align-self: start; }
.rpg-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.rpg-name { margin: 0; text-align: center; font: 700 18px/1.2 var(--f-round); color: var(--yellow); }
.rpg-level { margin: 6px 0 10px; text-align: center; font: 11px var(--f-pixel); color: #cfc6ff; }
.rpg-level b { color: #fff; font-weight: 400; font-size: 15px; }

.rpg-bar {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 2px 8px;
  margin: 8px 0;
}
.rpg-bar-label { font: 9px var(--f-pixel); color: var(--yellow); }
.rpg-meter {
  height: 12px;
  background: #3b2f6e;
  border: 2px solid #fff;
  border-radius: 3px;
  overflow: hidden;
}
.rpg-meter i { display: block; height: 100%; background: var(--green); }
.rpg-bar-num { font: 8px var(--f-pixel); color: #fff; }
.rpg-bar-name { grid-column: 2 / -1; font: 600 12px var(--f-round); color: #cfc6ff; }

.rpg-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 2px dashed #5b4ea0;
}
.rpg-facts dt { font: 8px/1.8 var(--f-pixel); color: var(--yellow); }
.rpg-facts dd { margin: 0; font: 600 14px/1.3 var(--f-round); }

.rpg-window { display: flex; flex-direction: column; min-width: 0; }
.rpg-menu { display: flex; flex-wrap: wrap; gap: 4px 6px; padding-bottom: 12px; border-bottom: 2px dashed #5b4ea0; }
.rpg-menu button {
  background: none;
  border: 0;
  color: #fff;
  font: 11px/1.6 var(--f-pixel);
  padding: 6px 8px 6px 18px;
  cursor: pointer;
  position: relative;
  border-radius: 4px;
}
.rpg-menu button::before { content: "▶"; position: absolute; left: 3px; color: var(--pink); visibility: hidden; }
.rpg-menu button[aria-selected="true"] { background: #3b2f6e; color: var(--yellow); }
.rpg-menu button[aria-selected="true"]::before,
.rpg-menu button:hover::before { visibility: visible; }
.rpg-menu button:hover::before { animation: rpg-blink .6s steps(2) infinite; }
@keyframes rpg-blink { 50% { opacity: 0; } }
.rpg-panel { padding-top: 12px; font: 400 15px/1.45 var(--f-round); outline-offset: 4px; }
.rpg-panel a { color: var(--yellow); }
.rpg-hint { margin: 12px 0 0; font: 600 13px var(--f-round); color: #cfc6ff; }

/* Stats */
.rpg-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.rpg-stats li { display: grid; grid-template-columns: minmax(150px, 1fr) auto 28px; align-items: center; gap: 10px; }
.rpg-stat-name { font: 600 15px var(--f-round); }
.rpg-pips { display: flex; gap: 3px; }
.rpg-pips i { width: 14px; height: 14px; border: 2px solid #fff; border-radius: 2px; background: #3b2f6e; }
.rpg-pips i.on { background: var(--pink); }
.rpg-pips i.half { background: linear-gradient(90deg, var(--pink) 50%, #3b2f6e 50%); }
.rpg-stat-num { font: 400 11px var(--f-pixel); color: var(--yellow); text-align: right; }

/* Inventory */
.rpg-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.rpg-items li { display: flex; align-items: center; gap: 10px; font: 600 14px/1.25 var(--f-round); }
.rpg-slot {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: #3b2f6e;
  border: 2px solid #fff;
  border-radius: 6px;
}

/* Quest log */
.rpg-quests { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rpg-quest details { background: #241a52; border: 2px solid #5b4ea0; border-radius: 6px; }
.rpg-quest.is-active details { border-color: var(--yellow); }
.rpg-quest summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}
.rpg-quest summary::-webkit-details-marker { display: none; }
.rpg-quest-name { font: 700 16px/1.25 var(--f-round); color: var(--yellow); }
.rpg-quest-name::before { content: "▸ "; color: var(--pink); }
.rpg-quest details[open] .rpg-quest-name::before { content: "▾ "; }
.rpg-quest-tag { font: 8px/2 var(--f-pixel); color: #7dff7d; white-space: nowrap; }
.rpg-quest.is-active .rpg-quest-tag { color: var(--yellow); }
.rpg-quest-role { grid-column: 1 / -1; font: 600 14px var(--f-round); }
.rpg-quest-meta { grid-column: 1 / -1; font: 600 12px var(--f-round); color: #cfc6ff; }
.rpg-loot { margin: 0; padding: 0 14px 12px 32px; font: 400 14px/1.45 var(--f-round); color: #f1edff; }
.rpg-loot li { margin-top: 4px; }
.rpg-loot li::marker { content: "✦ "; color: var(--pink); }

/* Achievements */
.rpg-badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.rpg-badges li { display: flex; gap: 10px; align-items: flex-start; font: 400 14px/1.4 var(--f-round); }
.rpg-badges b { color: var(--yellow); }
.rpg-badge-icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: radial-gradient(circle at 35% 30%, #fff6b0, var(--yellow) 60%, #e0a800);
  border: 3px solid #fff;
  border-radius: 50%;
}

/* Training */
.rpg-training { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.rpg-school b { color: var(--yellow); font: 700 15px var(--f-round); }
.rpg-school ul { margin: 4px 0 0; padding-left: 20px; }
.rpg-school p { margin: 4px 0 0; }

.rpg-summary {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  background: var(--cream);
  border-radius: 18px;
  padding: 14px 20px;
  font: 400 19px/1.35 var(--f-hand);
  box-shadow: 0 5px 0 #e8d9b0, 0 0 0 4px #fff;
}
.rpg-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 18px 0 0; }

/* ===== Shop counter ===== */
.shop {
  position: relative;
  background: #fff8e4;
  border: 5px solid #fff;
  border-radius: 26px;
  box-shadow: 0 0 0 5px #c47a3a, 0 10px 0 5px rgba(43, 26, 82, .2);
  padding: 0 20px 22px;
  overflow: hidden;
  text-align: center;
}
/* Striped awning with a scalloped edge */
.shop-awning {
  height: 46px;
  margin: 0 -20px;
  background:
    radial-gradient(circle at 20px 0, transparent 19px, #fff8e4 20px) 0 34px / 40px 14px repeat-x,
    repeating-linear-gradient(90deg, var(--pink) 0 40px, #fff 40px 80px);
  background-color: #fff;
}
.shop-sign {
  display: inline-block;
  margin: 10px 0 0;
  padding: 6px 22px;
  background: #8a5a2b;
  color: #fff3d6;
  border: 4px solid #5e3a17;
  border-radius: 12px;
  font: 400 30px/1.2 var(--f-logo);
  letter-spacing: 1px;
  text-shadow: 0 2px 0 #5e3a17;
  transform: rotate(-1.5deg);
}
.shop-counter {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  margin: 26px auto 0;
  max-width: 760px;
}
.shop-keeper {
  flex: none;
  filter: drop-shadow(2px 0 0 var(--ink)) drop-shadow(-2px 0 0 var(--ink)) drop-shadow(0 2px 0 var(--ink)) drop-shadow(0 -2px 0 var(--ink));
  animation: bob 1.2s steps(2) infinite;
}
.shop-dialog { margin: 0; flex: 1; text-align: left; cursor: default; }

.shop-shelf {
  list-style: none;
  margin: 26px 0 0;
  padding: 0 0 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px 16px;
  /* wooden shelf boards under each row */
  background: linear-gradient(transparent calc(100% - 14px), #c47a3a calc(100% - 14px));
}
.shop-item {
  position: relative;
  background: #fff;
  border: 3px solid #e0c98e;
  border-radius: 18px;
  padding: 14px 14px 40px;
  text-align: left;
  box-shadow: 0 6px 0 #c47a3a;
  transition: transform .15s;
}
.shop-item:hover { transform: translateY(-4px) rotate(-.6deg); }
.shop-item-icon { display: block; font-size: 38px; line-height: 1; }
.shop-item h3 { margin: 8px 0 0; font: 700 18px var(--f-round); color: var(--ink); }
.shop-item-tag { margin: 2px 0 6px; font: 600 11px var(--f-round); color: #9a7a3a; text-transform: uppercase; letter-spacing: 1px; }
.shop-item-blurb { margin: 0; font: 400 17px/1.3 var(--f-hand); }
/* Price tag hanging off the corner */
.shop-price {
  position: absolute;
  right: 12px;
  bottom: 10px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 4px 12px 12px 4px;
  padding: 2px 10px 2px 16px;
  font: 700 13px var(--f-round);
  color: var(--ink);
  transform: rotate(-4deg);
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
  transition: transform .15s, background .15s;
}
.shop-price:hover, .shop-price:focus-visible { background: var(--pink); transform: rotate(-4deg) translateY(-2px); }
.shop-price:active { transform: rotate(-4deg) translateY(1px); box-shadow: 0 1px 0 var(--ink); }
.shop-price::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ink);
}
.shop-closing { margin: 18px 0 8px; font: 400 21px var(--f-hand); }
.shop-cta { margin: 0; }

.shop-pay {
  margin: 22px auto 0;
  max-width: 520px;
  background: #fff;
  border: 3px dashed #e0c98e;
  border-radius: 18px;
  padding: 12px 16px;
}
.shop-pay:empty { display: none; }
.shop-pay-title { margin: 0; font: 700 18px var(--f-round); }
.shop-pay-note { margin: 2px 0 10px; font: 400 18px var(--f-hand); }
.shop-pay-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pay-btn {
  display: inline-block;
  padding: 10px 16px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--ink);
  color: #fff;
  font: 700 16px var(--f-round);
  text-decoration: none;
  cursor: pointer;
}
.pay-btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.pay-venmo { background: #008cff; }
.pay-zelle { background: #6d1ed4; }
.shop-pay-status { min-height: 1.4em; margin: 8px 0 0; font: 400 19px var(--f-hand); color: var(--purple); }

/* ===== Guestbook (2000s style) ===== */
.guestbook {
  background-color: #fffbe0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ctext x='8' y='22' font-size='12' fill='%23ffc2df'%3E%E2%9C%BF%3C/text%3E%3Ctext x='38' y='52' font-size='10' fill='%23c9b8f2'%3E%E2%98%85%3C/text%3E%3C/svg%3E");
  border: 4px ridge #b39af0;
  border-radius: 6px;
  padding: 20px;
  text-align: center;
}
.gb-title {
  margin: 0;
  font: 400 clamp(28px, 6vw, 42px)/1.1 var(--f-logo);
  background: linear-gradient(90deg, #ff4d6d, #ff8a1e, #ffd23f, #7cc85a, #37c6e6, #8a3fd1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
}
.gb-intro { max-width: 600px; margin: 6px auto 12px; font: 400 20px/1.3 var(--f-hand); }
.gb-cta { margin: 0 0 16px; }
/* One entry at a time between BACK / NEXT arrows (like the scrapbook) */
.gb-stage { display: flex; align-items: center; justify-content: center; gap: 14px; }
.gb-page { flex: 0 1 640px; min-width: 0; min-height: 230px; display: grid; align-items: center; text-align: left; }
.gb-entry {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  background: #fff;
  border: 2px outset #d6c2f5;
  padding: 14px 16px;
  box-shadow: 6px 6px 0 rgba(43, 26, 82, .15);
}
.gb-entry.flip-next { animation: gb-flip-next .25s ease-out; }
.gb-entry.flip-back { animation: gb-flip-back .25s ease-out; }
@keyframes gb-flip-next { from { opacity: 0; transform: translateX(30px) rotate(1.5deg); } }
@keyframes gb-flip-back { from { opacity: 0; transform: translateX(-30px) rotate(-1.5deg); } }
.gb-count { margin-top: 12px; }
.gb-entry.is-star { border: 3px double var(--orange); background: #fffdf3; }
.gb-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  background: var(--pink-soft);
  border: 2px inset #d6c2f5;
}
.gb-meta { margin: 0 0 4px; font: 12px/1.6 var(--f-body); color: #6b5a8a; }
.gb-meta b { color: var(--purple); font-size: 14px; }
.gb-role { background: #eadff7; color: var(--ink); border-radius: 999px; padding: 1px 8px; font-size: 11px; white-space: nowrap; }
.gb-date { white-space: nowrap; }
.gb-date::before { content: "· "; }
.gb-ribbon { background: var(--orange); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: bold; white-space: nowrap; }
.gb-text { margin: 0; font: 400 20px/1.35 var(--f-hand); white-space: pre-line; overflow-wrap: anywhere; }

.gb-card .sf-form { text-align: left; }
.gb-avatars { border: 3px dashed #d6c2f5; border-radius: 14px; padding: 8px 10px; margin: 0; }
.gb-avatars legend { font: 600 14px var(--f-round); padding: 0 4px; }
.gb-avatars > div { display: flex; flex-wrap: wrap; gap: 6px; }
.gb-pick { cursor: pointer; display: flex; }
.gb-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gb-pick > span {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 2px;
  min-width: 58px;
  min-height: 62px;
  padding: 6px 4px 4px;
  border: 2px solid #eadff7;
  border-radius: 10px;
  background: #fff;
}
.gb-pick-name { font: 600 10px var(--f-round); color: #6b5a8a; }
.gb-pick input:checked + span { border-color: var(--purple); background: var(--pink-soft); box-shadow: 0 3px 0 var(--purple); }
.gb-pick input:focus-visible + span { outline: 3px dashed var(--orange); outline-offset: 2px; }
/* Spam trap: off-screen, not just hidden, so robots still fill it in */
.gb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ===== Small screens ===== */
@media (max-width: 820px) {
  .rpg { grid-template-columns: 1fr; }
  .rpg-card { display: grid; grid-template-columns: 132px 1fr; gap: 0 16px; align-items: start; }
  .rpg-card > .rpg-portrait { grid-row: span 3; margin: 0; }
  .rpg-card > .rpg-name, .rpg-card > .rpg-level { text-align: left; }
  .rpg-card > .rpg-bar, .rpg-card > .rpg-facts { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .rpg-card { display: block; }
  .rpg-card > .rpg-portrait { margin: 0 auto 10px; }
  .rpg-card > .rpg-name, .rpg-card > .rpg-level { text-align: center; }
  .rpg-card, .rpg-window { padding: 12px; }
  .rpg-menu button { font-size: 9px; padding: 6px 6px 6px 16px; }
  .rpg-stats li { grid-template-columns: 1fr 28px; }
  .rpg-pips { grid-column: 1 / -1; grid-row: 2; }
  .rpg-pips i { width: 12px; height: 12px; }
  .shop { padding: 0 12px 18px; }
  .shop-awning { margin: 0 -12px; }
  .shop-sign { font-size: 24px; }
  .shop-keeper { display: none; }
  .guestbook { padding: 14px 10px; }
  /* Arrows go under the entry so it can use the full width */
  .gb-stage { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 14px 40px; }
  .gb-page { grid-column: 1 / -1; grid-row: 1; width: calc(100vw - 72px); min-height: 0; }
  .gb-entry { grid-template-columns: 48px 1fr; gap: 10px; }
  .gb-avatar { width: 48px; height: 48px; }
  .gb-avatar .px { width: 36px; height: auto; }
}

/* ===== "Behind the Game" devlogs: Animal Crossing museum plaque ===== */
.game-list li.has-devlog { display: flex; flex-direction: column; }
.game-list li.has-devlog .game { height: auto; flex: 1; }
.devlog-btn {
  align-self: flex-start;
  margin: -4px 0 6px 90px;
  padding: 3px 10px;
  background: #3b2a1a;
  color: #ffe9b8;
  border: 2px solid #c9a46a;
  border-radius: 999px;
  font: 700 12px var(--f-round);
  cursor: pointer;
}
.devlog-btn:hover { background: #5a3e24; color: #fff; }

.devlog-card {
  width: min(680px, 100%);
  padding: 0 0 20px;
  text-align: left;
  background: #fbf3df;
  box-shadow: 0 0 0 6px #6b4a2b, 0 0 0 9px #c9a46a;
}
.devlog-card .lightbox-close { z-index: 1; }
/* Dark wood plaque with gold lettering */
.plaque {
  margin: 0;
  padding: 22px 24px 18px;
  text-align: center;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 9px),
    linear-gradient(#5a3e24, #3b2a1a);
  border-bottom: 5px solid #c9a46a;
}
.plaque-kicker { margin: 0; font: 9px/1.6 var(--f-pixel); letter-spacing: 2px; color: #c9a46a; text-transform: uppercase; }
.plaque h2, .devlog-card .plaque h2 {
  margin: 4px 0 2px;
  font: 400 clamp(26px, 5vw, 36px)/1.1 var(--f-logo);
  color: #ffe08a;
  text-shadow: 0 2px 0 #6b4a1f, 0 0 12px rgba(255, 210, 63, .35);
}
.plaque-meta { margin: 0; font: 600 13px var(--f-round); color: #e8d3a8; }
.devlog-body { padding: 16px 22px 0; display: grid; gap: 12px; }
.devlog-sketch { margin: 0; justify-self: center; background: #fff; padding: 8px 8px 4px; box-shadow: 0 3px 8px rgba(0, 0, 0, .2); transform: rotate(-1deg); max-width: 100%; }
.devlog-sketch img { display: block; max-width: 100%; max-height: 280px; margin: 0 auto; }
.devlog-sketch figcaption { font: 400 18px var(--f-hand); text-align: center; padding-top: 4px; }
.devlog-section { background: #fff; border: 2px solid #ead9b5; border-radius: 14px; padding: 10px 14px; }
.devlog-section h3 { margin: 0 0 4px; font: 700 16px var(--f-round); color: #6b4a2b; }
.devlog-section p, .devlog-section ul { margin: 0; font: 400 18px/1.35 var(--f-hand); }
.devlog-section ul { padding-left: 20px; }
.devlog-section li + li { margin-top: 4px; }
.devlog-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.devlog-tools span { background: #f3e6c8; border: 1px solid #d9c39a; border-radius: 999px; padding: 1px 10px; font: 600 13px var(--f-round); color: #5a3e24; }
.devlog-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 0; }
.devlog-stats div { background: #3b2a1a; border-radius: 10px; padding: 8px 10px; text-align: center; }
.devlog-stats dt { font: 600 11px var(--f-round); color: #e8d3a8; }
.devlog-stats dd { margin: 2px 0 0; font: 12px var(--f-pixel); color: #ffe08a; }
.devlog-play { margin: 4px 0 0; text-align: center; }
@media (max-width: 520px) {
  .devlog-btn { margin-left: 8px; }
  .devlog-body { padding: 12px 12px 0; }
}

/* Wide (4:3) character portrait: fills the card instead of the small square */
.rpg-portrait.is-wide { width: 100%; height: auto; aspect-ratio: 4 / 3; }
@media (max-width: 820px) {
  .rpg-card.has-wide { display: block; }
  .rpg-card.has-wide > .rpg-portrait { width: min(100%, 360px); margin: 0 auto 10px; }
  .rpg-card.has-wide > .rpg-name, .rpg-card.has-wide > .rpg-level { text-align: center; }
}

/* ===== Guestbook pixel cards (click an entry; js/portfolio.js → cardHtml) ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gb-entry[role="button"] { cursor: pointer; transition: transform .15s; }
.gb-entry[role="button"]:hover { transform: translateY(-2px) rotate(-.4deg); }
.gb-entry[role="button"]:focus-visible { outline: 3px dashed var(--orange); outline-offset: 3px; }
.gb-open { margin: 6px 0 0; font: 8px var(--f-pixel); color: var(--purple); text-align: right; }

.gbc-wrap { position: relative; width: min(560px, 100%); max-height: 100%; overflow: auto; padding: 10px 6px 14px; }
.gbc-wrap .lightbox-close { top: 0; right: 0; z-index: 2; }
/* drop shadow lives on a wrapper, because the card's pixel corners are clipped */
.gbc-shadow { filter: drop-shadow(6px 6px 0 rgba(43, 26, 82, .45)); }
.pcard {
  --paper: #fffdf6;
  --edge: #c9b8f2;
  --ink: #2b1a52;
  position: relative;
  padding: 26px 26px 22px;
  background: var(--paper);
  border: 4px solid var(--edge);
  color: var(--ink);
  font: 10px/2.1 var(--f-pixel);
  text-align: left;
  overflow-wrap: anywhere;
  /* stepped "pixel" corners */
  clip-path: polygon(0 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px,
    100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%,
    8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px));
  animation: pc-pop .45s steps(5) both;
}
@keyframes pc-pop {
  from { transform: translateY(40px) scale(.35) rotate(-6deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.pcard p { margin: 0 0 10px; }
.pc-date { text-align: right; font-size: 8px; opacity: .75; }
.pc-hello { margin-bottom: 12px !important; }
.pc-text p { margin: 0 0 8px; }
.pc-gap { margin: 0 0 8px !important; text-align: center; opacity: .5; }
.pc-sign { margin: 14px 0 0 !important; text-align: right; }
.pc-sign b, .pc-from b, .pc-cname b { font-weight: 400; color: var(--accent, #8a3fd1); }
.pc-from { margin-top: 10px !important; text-align: right; font-size: 9px; }
.pc-head { margin: 0 0 10px !important; padding: 0 34px; text-align: center; font-size: 14px; line-height: 1.6; }
.pc-heart { font-family: Verdana, "Segoe UI Symbol", sans-serif; font-size: 1.3em; line-height: 1; color: var(--accent, #e0457b); }
.pc-deco { position: absolute; font-size: 30px; line-height: 1; pointer-events: none; }
.pc-d1 { top: 14px; left: 14px; }
.pc-d2 { top: 14px; right: 14px; }

/* Letter: cream paper with a lavender letterhead stripe */
.pc-letter { --paper: #fffdf6; --edge: #c9b8f2; padding-top: 34px; }
.pc-letterhead { position: absolute; top: 0; left: 0; right: 0; height: 14px; background: repeating-linear-gradient(90deg, #b39af0 0 12px, #d4c6f7 12px 24px); }
/* Online review: white card, gold stars */
.pc-review { --paper: #ffffff; --edge: #ffd23f; }
.pc-stars { text-align: center; font-size: 22px; line-height: 1; letter-spacing: 2px; }
/* Social comment: grey card, white bubble */
.pc-comment { --paper: #eef0f4; --edge: #9a93a8; }
.pc-crow { display: flex; gap: 10px; align-items: flex-start; }
.pc-avatar { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: var(--pink-soft); border: 3px solid #fff; }
.pc-cbubble { background: #fff; padding: 10px 12px; border: 3px solid #d6d9e0; }
.pc-cbubble p { margin: 0; }
.pc-cname { font-size: 9px; margin-bottom: 4px !important; }
.pc-actions { margin: 8px 0 0 58px !important; font-size: 8px; color: #6b5a8a; }
/* Index card: blue lines, pink margin line, purple ink */
.pc-index {
  --paper: #ffffff; --edge: #7cc6ff; --ink: #7d5ad4;
  background: linear-gradient(#ff8cc6, #ff8cc6) 0 30px / 100% 3px no-repeat, repeating-linear-gradient(transparent 0 19px, #bfe3ff 19px 21px) 0 30px, #fff;
  line-height: 21px;
}
/* Holiday card */
.pc-holiday { --paper: #ffffff; --edge: #7cc85a; --accent: #e8352e; padding-top: 30px; }
.pc-head-holiday { color: #3f8f2e; }
/* School newsletter shout-out: navy with a gold edge */
.pc-newsletter { --paper: #1b2a6b; --edge: #ffd23f; --ink: #ffffff; --accent: #ffd23f; padding-top: 30px; }
.pc-head-news { color: #ffd23f; }
/* Text messages: phone screen with chat bubbles */
.pc-texts { --paper: #15131a; --edge: #5a5268; --ink: #ffffff; --accent: #7cc6ff; }
.pc-chat { display: grid; gap: 10px; }
.pc-bubble { justify-self: start; max-width: 85%; margin: 0 !important; padding: 8px 12px; background: #3a3a44; border: 3px solid #4a4a56; }
/* Flower card */
.pc-flowers { --paper: #ffffff; --edge: #ff8cc6; --accent: #e0457b; }
.pc-flowerrow { text-align: center; font-size: 28px; line-height: 1; letter-spacing: 4px; }
/* Thank-you card */
.pc-thanks { --paper: #fff8e4; --edge: #e0c98e; --accent: #e0457b; padding-top: 32px; }
/* Christmas card */
.pc-christmas { --paper: #ffffff; --edge: #e8352e; --accent: #2e8b57; padding-top: 30px; }
.pc-head-xmas span:first-child { color: #2e8b57; }
.pc-head-xmas span:last-child { color: #e8352e; }
/* Note card in blue ink */
.pc-notecard { --paper: #ffffff; --edge: #5aa8f0; --ink: #2850c8; --accent: #2850c8; padding-top: 32px; }
/* Gift tag with a black-and-gold ribbon */
.pc-tag { --paper: #f4f4f4; --edge: #2b1a52; padding-top: 40px; text-align: center; }
.pc-tag .pc-text, .pc-tag .pc-sign { text-align: center; }
.pc-ribbon { position: absolute; top: 0; left: 0; right: 0; height: 18px; background: repeating-linear-gradient(90deg, #1b1b1b 0 16px, #1b1b1b 16px 18px), #1b1b1b; }
.pc-ribbon::before, .pc-ribbon::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: #e0a800; }
.pc-ribbon::before { top: 5px; }
.pc-ribbon::after { bottom: 5px; }
.pc-ribbon i { position: absolute; top: -2px; left: 50%; width: 24px; height: 22px; margin-left: -12px; background: #1b1b1b; border: 3px solid #e0a800; }
/* Doodle card: pink, flower + sun doodles */
.pc-doodle { --paper: #fffaf0; --edge: #ff8cc6; --accent: #e0457b; padding-top: 54px; }
/* Visitor guestbook page */
.pc-guest { --paper: #f3eeff; --edge: #b39af0; padding-top: 30px; }
.pc-head-guest { color: #7d5ad4; }

@media (max-width: 520px) {
  .pcard { padding: 22px 16px 18px; font-size: 9px; line-height: 2; }
  .pc-head { font-size: 13px; }
  .pc-deco { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .pcard { animation: none; } }
