/* =========================================================
   Short Story Break - Author Modal (shared)
   ========================================================= */

.ssbAuthorLink{
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  text-align: inherit;
  line-height: inherit;
  cursor: pointer;
}

.ssbAuthorLink:hover{
  text-decoration: underline;
  text-underline-offset: .18em;
}

.ssbAuthorLink:focus-visible{
  outline: none;
  box-shadow: var(--focus, 0 0 0 3px rgba(201,162,78,.28));
  border-radius: 10px;
}

/* Scroll lock while modal open */
html.ssbModalLock{
  overflow: hidden;
}

/* Overlay */
.ssbAM{
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}
.ssbAM[aria-hidden="false"]{
  display: block;
}

.ssbAMBackdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
}

html[data-theme="light"] .ssbAMBackdrop{
  background: rgba(11,11,16,.18);
}

/* Panel */
.ssbAMPanel{
  position: absolute;
  inset: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(980px, calc(100% - 28px));
  max-height: min(84vh, 860px);
  overflow: auto;

  border-radius: 22px;
  border: 1px solid var(--line2, rgba(244,241,231,.10));
  background: var(--card2, rgba(16,17,26,.78));
  color: var(--text, rgba(244,241,231,.96));
  box-shadow: var(--shadow, 0 18px 60px rgba(0,0,0,.45));
}

html[data-theme="light"] .ssbAMPanel{
  background: var(--card2, rgba(244,241,231,.94));
}

/* Close */
.ssbAMClose{
  position: sticky;
  top: 0;
  float: right;
  margin: 12px 12px 0 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line2, rgba(244,241,231,.10));
  background: rgba(244,241,231,.06);
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

html[data-theme="light"] .ssbAMClose{
  background: rgba(11,11,16,.04);
}

.ssbAMClose:hover{
  transform: translateY(-1px);
}

.ssbAMInner{
  padding: 18px 18px 22px;
}

.ssbAMHeader{
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding-top: 6px;
}

.ssbAMAvatar{
  width: 72px;
  height: 72px;
  border-radius: 22px;
  border: 1px solid var(--line2, rgba(244,241,231,.10));
  background: rgba(201,162,78,.12);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.ssbAMAvatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ssbAMAvatar .ssbAMInitial{
  font-weight: 900;
  letter-spacing: .02em;
  font-size: 22px;
}

.ssbAMName{
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 900;
  letter-spacing: .02em;
}

.ssbAMTagline{
  margin-top: 4px;
  color: var(--muted, rgba(244,241,231,.72));
  line-height: 1.6;
  font-size: 14px;
}

.ssbAMMeta{
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ssbAMChip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 10px;
  border: 1px solid var(--line2, rgba(244,241,231,.10));
  background: rgba(244,241,231,.06);
  font-size: 13px;
  color: inherit;
}

html[data-theme="light"] .ssbAMChip{
  background: rgba(11,11,16,.03);
}

.ssbAMLinks{
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ssbAMLink{
  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: 1px solid var(--line2, rgba(244,241,231,.10));
  background: rgba(244,241,231,.06);
  display: grid;
  place-items: center;
  color: inherit;
  text-decoration: none;
}

.ssbAMLinks{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ssbAMLink{
  --am-bg: rgba(244,241,231,.06);
  --am-fg: inherit;
  --am-ring: rgba(201,162,78,.34);

  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: 1px solid var(--line2, rgba(244,241,231,.10));
  background: var(--am-bg);

  display: grid;
  place-items: center;

  color: var(--am-fg);
  text-decoration: none;

  box-shadow: 0 10px 26px rgba(0,0,0,.10);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, filter .16s ease;
}

html[data-theme="light"] .ssbAMLink{
  box-shadow: 0 10px 22px rgba(11,11,16,.08);
}

.ssbAMLink:hover{
  transform: translateY(-2px);
  border-color: rgba(201,162,78,.45);
  box-shadow: 0 16px 34px rgba(0,0,0,.16);
  filter: saturate(1.12);
}

.ssbAMLink:active{
  transform: translateY(0px) scale(.98);
}

.ssbAMLink:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px var(--am-ring), 0 16px 34px rgba(0,0,0,.16);
}

.ssbAMLink svg{
  width: 30px;
  height: 30px;
  display: block;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.6;
}

/* =========================
   Per-type “brand-ish” skins
   ========================= */

/* Neutral / website */
.ssbAMLink--website{
  --am-bg: color-mix(in oklab, var(--brand, #c9a24e) 18%, rgba(244,241,231,.06));
}

/* X */
html[data-theme="light"] .ssbAMLink--x{
  --am-bg: #0b0b10;
  --am-fg: #ffffff;
  border-color: rgba(11,11,16,.22);
}
html:not([data-theme="light"]) .ssbAMLink--x{
  --am-bg: #f4f1e7;
  --am-fg: #0b0b10;
  border-color: rgba(244,241,231,.22);
}

/* Instagram */
.ssbAMLink--instagram{
  --am-bg: radial-gradient(circle at 30% 110%,
    #feda75 0%,
    #fa7e1e 25%,
    #d62976 55%,
    #962fbf 75%,
    #4f5bd5 100%);
  --am-fg: #ffffff;
  border-color: rgba(255,255,255,.16);
}

/* Threads */
html[data-theme="light"] .ssbAMLink--threads{
  --am-bg: #111111;
  --am-fg: #ffffff;
  border-color: rgba(11,11,16,.18);
}
html:not([data-theme="light"]) .ssbAMLink--threads{
  --am-bg: #f4f1e7;
  --am-fg: #111111;
  border-color: rgba(244,241,231,.22);
}

/* Ameblo (domain inferred) */
.ssbAMLink--ameblo{
  --am-bg: linear-gradient(135deg, #15c06f 0%, #00a2a2 100%);
  --am-fg: #ffffff;
  border-color: rgba(255,255,255,.16);
}

/* Amazon (domain inferred) */
.ssbAMLink--amazon{
  --am-bg: linear-gradient(135deg, #ff9900 0%, #ffb347 100%);
  --am-fg: #0b0b10;
  border-color: rgba(11,11,16,.10);
}

/* YouTube */
.ssbAMLink--youtube{
  --am-bg: #ff0033;
  --am-fg: #ffffff;
  border-color: rgba(255,255,255,.16);
}

/* Optional: mail / phone */
.ssbAMLink--mail{
  --am-bg: color-mix(in oklab, var(--brand, #c9a24e) 14%, rgba(244,241,231,.06));
}
.ssbAMLink--phone{
  --am-bg: color-mix(in oklab, rgba(56,180,138,1) 22%, rgba(244,241,231,.06));
}

@media (prefers-reduced-motion: reduce){
  .ssbAMLink{ transition: none; }
  .ssbAMLink:hover{ transform: none; }
}


.ssbAMSections{
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.ssbAMSec{
  border-top: 1px solid var(--line2, rgba(244,241,231,.10));
  padding-top: 14px;
}

.ssbAMSec h3{
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .02em;
}

.ssbAMText{
  color: var(--text, rgba(244,241,231,.96));
  line-height: 1.85;
  font-size: 14px;
}

.ssbAMText p{
  margin: 0 0 10px;
}

.ssbAMText ul{
  margin: 0;
  padding-left: 1.2em;
}
.ssbAMText li{
  margin: 0 0 6px;
}

/* Works (collapsible) */
.ssbAMWorks{
  margin-top: 16px;
  border-top: 1px solid var(--line2, rgba(244,241,231,.10));
  padding-top: 12px;
}

.ssbAMWorks summary{
  cursor: pointer;
  font-weight: 900;
  letter-spacing: .02em;
  list-style: none;
}
.ssbAMWorks summary::-webkit-details-marker{ display: none; }

.ssbAMWorksBody{
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.ssbAMWork{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border-radius: 16px;
  border: 1px solid var(--line2, rgba(244,241,231,.10));
  background: rgba(244,241,231,.05);
  padding: 12px 12px;
  text-decoration: none;
  color: inherit;
}

html[data-theme="light"] .ssbAMWork{
  background: rgba(11,11,16,.02);
}

.ssbAMWork:hover{
  border-color: rgba(201,162,78,.35);
}

.ssbAMWorkTitle{
  font-weight: 900;
  line-height: 1.35;
}

.ssbAMWorkMeta{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ssbAMWorkBadge{
  border-radius: 999px;
  padding: 6px 9px;
  border: 1px solid var(--line2, rgba(244,241,231,.10));
  background: rgba(201,162,78,.10);
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 560px){
  .ssbAMHeader{ grid-template-columns: 64px 1fr; }
  .ssbAMAvatar{ width: 64px; height: 64px; border-radius: 20px; }
  .ssbAMLink{ width: 60px; height: 60px; border-radius: 16px; }
  .ssbAMWork{ grid-template-columns: 1fr; }
  .ssbAMWorkMeta{ justify-content: flex-start; }
}
