/* Plakai Friends v33 — Editorial Cafe UI */
:root {
  --hk-ink: #272b2a;
  --hk-ink-soft: #5d625e;
  --hk-paper: #f4f0e8;
  --hk-paper-deep: #e9e2d5;
  --hk-white: #fffdf8;
  --hk-navy: #233548;
  --hk-navy-active: #172536;
  --hk-sage: #687b6d;
  --hk-gold: #ae8950;
  --hk-line: rgba(39, 43, 42, .14);
  --hk-shadow: 0 22px 60px rgba(31, 35, 33, .14);
  --hk-radius-large: 18px;
  --hk-radius-medium: 12px;
  --hk-ease: cubic-bezier(.22, 1, .36, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eee9e0;
}

[hidden] {
  display: none !important;
}

.hk-cat-widget {
  width: 100%;
  margin: 0 auto;
  padding: 18px 12px 24px;
  color: var(--hk-ink);
  font-family: "Noto Sans Thai", "Segoe UI", system-ui, -apple-system, sans-serif;
  text-rendering: optimizeLegibility;
}

.hk-cat-card,
.hk-game-actions {
  width: 100%;
  max-width: 390px;
  margin-inline: auto;
}

.hk-cat-card {
  position: relative;
  text-align: center;
}

/* Title */
.hk-title-screen {
  position: relative;
  overflow: hidden;
  padding: 24px 20px 21px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: var(--hk-radius-large);
  background:
    linear-gradient(180deg, rgba(244, 240, 232, .22), rgba(244, 240, 232, .84)),
    url("assets/01_title_background_v44.webp?v=20260713_44") center / cover;
  box-shadow: var(--hk-shadow);
}

.hk-title-screen::before {
  content: "PLAKAI FRIENDS";
  display: block;
  margin-bottom: 8px;
  color: var(--hk-sage);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .22em;
}

.hk-title-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.28), transparent 42%);
}

.hk-title-screen > * {
  position: relative;
  z-index: 1;
}

.hk-title-main {
  max-width: 310px;
  margin: 0 auto 15px;
  color: var(--hk-ink);
  font-family: Georgia, "Noto Serif Thai", "Times New Roman", serif;
  font-size: clamp(1.12rem, 4.7vw, 1.32rem);
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: -.015em;
}

.hk-sound-toggle {
  position: absolute;
  top: 17px;
  right: 16px;
  z-index: 3;
  padding: 5px 7px;
  border: 1px solid rgba(39,43,42,.16);
  border-radius: 6px;
  background: rgba(255,253,248,.64);
  color: var(--hk-ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .48rem;
  font-weight: 700;
  letter-spacing: .09em;
  cursor: pointer;
}

.hk-sound-toggle[aria-pressed="false"] {
  opacity: .58;
}

.hk-pakai-navi {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  max-width: 330px;
  margin: 0 auto 16px;
  padding: 10px 13px 10px 10px;
  border: 1px solid var(--hk-line);
  border-radius: var(--hk-radius-medium);
  background: rgba(255, 253, 248, .82);
  box-shadow: 0 8px 24px rgba(37, 40, 38, .07);
  backdrop-filter: blur(8px);
}

.hk-pakai-stage {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: var(--hk-paper);
}

.hk-pakai-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: hkPakaiBreathe 3.6s ease-in-out infinite;
}

.hk-pakai-speech {
  min-width: 0;
  text-align: left;
}

.hk-pakai-speech p {
  margin: 0;
  color: #424844;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.48;
}

.hk-card-back-preview {
  width: min(42vw, 166px);
  margin: 0 auto;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 13px;
  box-shadow: 0 16px 38px rgba(36, 39, 37, .18);
  transform: rotate(-1deg);
  animation: hkCardIdle 4s var(--hk-ease) infinite;
}

.hk-card-back-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mood selection */
.hk-mood-picker {
  max-width: 330px;
  margin: 0 auto 17px;
  padding: 14px;
  border: 1px solid var(--hk-line);
  border-radius: 12px;
  background: rgba(255, 253, 248, .76);
  text-align: left;
  backdrop-filter: blur(8px);
}

.hk-mood-kicker {
  margin: 0 0 4px;
  color: var(--hk-sage);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .18em;
}

.hk-mood-picker h3 {
  margin: 0 0 11px;
  color: var(--hk-ink);
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.4;
}

.hk-mood-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.hk-mood-option {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--hk-line);
  border-radius: 8px;
  background: rgba(255,255,255,.54);
  color: var(--hk-ink-soft);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.hk-mood-option span,
.hk-mood-option small {
  display: block;
}

.hk-mood-option span {
  color: var(--hk-ink);
  font-size: .74rem;
  font-weight: 800;
}

.hk-mood-option small {
  margin-top: 2px;
  font-size: .58rem;
  line-height: 1.3;
}

.hk-mood-option:hover {
  transform: translateY(-1px);
}

.hk-mood-option.is-selected {
  border-color: rgba(104, 123, 109, .58);
  background: rgba(104, 123, 109, .11);
  box-shadow: inset 3px 0 0 var(--hk-sage);
}

.hk-mood-option:focus-visible {
  outline: 3px solid rgba(174, 137, 80, .34);
  outline-offset: 2px;
}

.hk-daily-note {
  margin: 10px 0 0;
  color: var(--hk-ink-soft);
  font-size: .6rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
}

.hk-weekday-theme {
  margin: 5px 0 0;
  color: var(--hk-gold);
  font-family: Georgia, "Noto Serif Thai", "Times New Roman", serif;
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.35;
  text-align: center;
}

/* Result card */
.hk-friend-card {
  --hk-rarity: var(--hk-gold);
  position: relative;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: var(--hk-radius-large);
  background:
    linear-gradient(180deg, rgba(255,255,255,.58), transparent 26%),
    var(--hk-paper);
  color: var(--hk-ink);
  box-shadow: var(--hk-shadow);
  isolation: isolate;
  transform-origin: center;
}

.hk-friend-card::before {
  content: "PLAKAI FRIENDS  /  PORTRAIT No. 01";
  position: absolute;
  left: 7%;
  top: 3.1%;
  z-index: 5;
  color: var(--hk-ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .54rem;
  font-weight: 700;
  letter-spacing: .13em;
}

.hk-friend-card::after {
  content: "CURATED BY PLAKAI";
  position: absolute;
  bottom: 2.25%;
  left: 0;
  z-index: 5;
  width: 100%;
  color: var(--hk-sage);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-align: center;
}

.hk-friend-card.is-common { --hk-rarity: #a47f52; }
.hk-friend-card.is-rare { --hk-rarity: #547a91; }
.hk-friend-card.is-epic { --hk-rarity: #74658b; }
.hk-friend-card.is-legendary { --hk-rarity: #a47a27; }

.hk-card-base {
  display: none;
}

.hk-photo-slot {
  position: absolute;
  top: 7.2%;
  left: 6.4%;
  z-index: 2;
  width: 87.2%;
  height: 45.5%;
  overflow: hidden;
  border-radius: 11px;
  background: #d8d1c6;
  box-shadow: 0 12px 28px rgba(32, 36, 34, .15);
}

.hk-photo-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .36);
}

.hk-cat-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

.hk-friend-card.has-portrait-photo .hk-photo-slot {
  background-color: #d8d1c6;
  background-image:
    linear-gradient(rgba(34, 39, 36, .20), rgba(34, 39, 36, .20)),
    var(--hk-cat-photo);
  background-position: center;
  background-size: cover;
}

.hk-friend-card.has-portrait-photo .hk-cat-image {
  object-fit: contain;
  backdrop-filter: blur(12px);
}

.hk-cat-placeholder,
.hk-cat-placeholder.is-hidden {
  display: none;
}

.hk-info-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.hk-cat-meta {
  position: absolute;
  top: 55.5%;
  left: 7%;
  display: flex;
  width: 86%;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
}

.hk-cat-result-headline {
  display: none;
}

.hk-cat-rarity-badge {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--hk-rarity);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hk-cat-rarity-badge::before,
.hk-cat-rarity-badge::after {
  content: "";
  display: block;
  width: 30px;
  height: 1px;
  background: currentColor;
  opacity: .5;
}

.hk-cat-mood-badge {
  overflow: hidden;
  max-width: 54%;
  color: var(--hk-ink-soft);
  font-size: .57rem;
  font-weight: 700;
  letter-spacing: .01em;
  text-overflow: ellipsis;
}

.hk-daily-mark {
  position: absolute;
  top: 3.05%;
  right: 7%;
  margin: 0;
  color: var(--hk-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .53rem;
  font-weight: 700;
  letter-spacing: .13em;
}

.hk-cat-name {
  position: absolute;
  top: 58.3%;
  left: 8%;
  width: 84%;
  margin: 0;
  overflow: hidden;
  color: var(--hk-ink);
  font-family: Georgia, "Noto Serif Thai", "Times New Roman", serif;
  font-size: clamp(1.5rem, 6vw, 1.78rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.02em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-cat-profile {
  position: absolute;
  top: 63.4%;
  left: 8%;
  display: grid;
  width: 84%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.hk-cat-profile p {
  min-width: 0;
  margin: 0;
  padding: 5px 4px;
  border: 1px solid rgba(39,43,42,.10);
  border-radius: 6px;
  background: rgba(255,253,248,.45);
  text-align: center;
}

.hk-cat-profile span,
.hk-cat-profile strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-cat-profile span {
  color: var(--hk-sage);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .39rem;
  font-weight: 700;
  letter-spacing: .07em;
}

.hk-cat-profile strong {
  margin-top: 2px;
  color: var(--hk-ink-soft);
  font-size: .48rem;
  font-weight: 750;
}

.hk-cat-message {
  position: absolute;
  top: 70.3%;
  left: 10%;
  display: flex;
  width: 80%;
  min-height: 9.2%;
  margin: 0;
  padding: 12px 16px;
  align-items: center;
  justify-content: center;
  border-block: 1px solid var(--hk-line);
  color: #343937;
  font-family: Georgia, "Noto Serif Thai", "Times New Roman", serif;
  font-size: clamp(.98rem, 4.3vw, 1.18rem);
  font-weight: 700;
  line-height: 1.38;
  text-align: center;
}

.hk-pakai-comment {
  position: absolute;
  top: 81.7%;
  left: 9%;
  display: grid;
  width: 82%;
  min-height: 8.9%;
  padding: 9px 12px 9px 9px;
  grid-template-columns: 43px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 1px solid var(--hk-line);
  border-radius: 10px;
  background: rgba(255, 253, 248, .56);
}

.hk-pakai-comment-image {
  display: block;
  width: 43px;
  height: 43px;
  object-fit: contain;
  filter: grayscale(.08) drop-shadow(0 4px 6px rgba(39,43,42,.10));
}

.hk-cat-intro {
  position: static;
  width: auto;
  margin: 0;
  color: var(--hk-ink-soft);
  font-size: .67rem;
  font-weight: 650;
  line-height: 1.42;
  text-align: left;
}

.hk-cat-personality {
  display: none;
}

/* Loading */
.hk-cat-loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(244, 240, 232, .88);
  color: var(--hk-ink-soft);
  backdrop-filter: blur(10px);
}

.hk-cat-loading.is-active {
  display: flex;
}

.hk-cat-loading span,
.hk-full-loading-ring {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(104, 123, 109, .20);
  border-top-color: var(--hk-sage);
  border-radius: 50%;
  animation: hkSpin .8s linear infinite;
}

.hk-cat-loading p,
.hk-full-loading p {
  margin: 13px 0 0;
  padding: 0 22px;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.45;
}

.hk-full-loading {
  display: grid;
  min-height: 560px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: var(--hk-radius-large);
  background: var(--hk-paper);
  box-shadow: var(--hk-shadow);
}

.hk-full-loading-box {
  display: flex;
  max-width: 280px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--hk-ink-soft);
}

.hk-full-loading-pakai {
  width: 112px;
  height: 112px;
  margin-bottom: 18px;
  object-fit: contain;
  animation: hkPakaiBreathe 2.8s ease-in-out infinite;
}

/* Status and action */
.hk-cat-status {
  min-height: 1.3em;
  margin: 10px 0 0;
  color: var(--hk-ink-soft);
  font-size: .66rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: .01em;
}

.hk-game-actions {
  margin-top: 12px;
  text-align: center;
}

.hk-cat-button,
.hk-share-button {
  position: relative;
  width: 100%;
  max-width: 280px;
  min-height: 48px;
  margin: 0 auto;
  padding: 12px 24px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 10px;
  background: var(--hk-navy);
  color: var(--hk-white);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 750;
  letter-spacing: .025em;
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(35, 53, 72, .20);
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.hk-cat-button:hover,
.hk-share-button:hover {
  background: #2d4359;
  box-shadow: 0 11px 26px rgba(35, 53, 72, .24);
  transform: translateY(-1px);
}

.hk-cat-button:active,
.hk-share-button:active {
  background: var(--hk-navy-active);
  box-shadow: 0 5px 13px rgba(35, 53, 72, .18);
  transform: translateY(2px);
}

.hk-cat-button:focus-visible,
.hk-share-button:focus-visible {
  outline: 3px solid rgba(174, 137, 80, .42);
  outline-offset: 3px;
}

.hk-cat-button:disabled,
.hk-share-button:disabled {
  cursor: wait;
  opacity: .58;
  transform: none;
}

.hk-share-actions,
.hk-share-note {
  margin-top: 9px;
}

/* Recent friends */
.hk-history-section {
  width: 100%;
  max-width: 390px;
  margin: 24px auto 0;
  padding: 17px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 16px;
  background: rgba(244, 240, 232, .90);
  box-shadow: 0 16px 42px rgba(31, 35, 33, .10);
}

.hk-history-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  text-align: left;
}

.hk-history-heading p,
.hk-history-heading h3 {
  margin: 0;
}

.hk-history-heading p {
  color: var(--hk-sage);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .18em;
}

.hk-history-heading h3 {
  margin-top: 3px;
  color: var(--hk-ink);
  font-family: Georgia, "Noto Serif Thai", "Times New Roman", serif;
  font-size: 1rem;
}

.hk-history-heading > span {
  color: var(--hk-ink-soft);
  font-size: .62rem;
  font-weight: 700;
}

.hk-history-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hk-history-item {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 7px;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--hk-line);
  border-radius: 9px;
  background: rgba(255,253,248,.68);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease;
}

.hk-history-item:hover {
  border-color: rgba(104,123,109,.46);
  transform: translateY(-1px);
}

.hk-history-item:focus-visible {
  outline: 3px solid rgba(174,137,80,.32);
  outline-offset: 2px;
}

.hk-history-item > img {
  width: 42px;
  height: 42px;
  border-radius: 7px;
  object-fit: cover;
}

.hk-history-copy {
  min-width: 0;
  text-align: left;
}

.hk-history-copy p,
.hk-history-copy h4 {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-history-copy p {
  color: var(--hk-sage);
  font-size: .48rem;
  font-weight: 750;
}

.hk-history-copy h4 {
  margin-top: 2px;
  color: var(--hk-ink);
  font-size: .67rem;
}

.hk-favorite-button {
  display: grid;
  width: 24px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--hk-gold);
  font-size: 1.05rem;
  cursor: pointer;
}

.hk-favorite-button:focus-visible {
  border-radius: 5px;
  outline: 2px solid rgba(174,137,80,.42);
}

/* Seven-day journal */
.hk-diary-section {
  width: 100%;
  max-width: 390px;
  margin: 13px auto 0;
  padding: 17px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 16px;
  background: rgba(244,240,232,.86);
  box-shadow: 0 14px 36px rgba(31,35,33,.08);
}

.hk-diary-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.hk-diary-day {
  display: flex;
  min-width: 0;
  min-height: 70px;
  padding: 5px 2px;
  align-items: center;
  flex-direction: column;
  border: 1px solid var(--hk-line);
  border-radius: 7px;
  background: rgba(255,253,248,.42);
}

.hk-diary-day span {
  color: var(--hk-sage);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .4rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.hk-diary-day img {
  width: 30px;
  height: 30px;
  margin-top: 5px;
  border-radius: 50%;
  object-fit: cover;
}

.hk-diary-day strong {
  overflow: hidden;
  width: 100%;
  margin-top: 4px;
  color: var(--hk-ink-soft);
  font-size: .42rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hk-diary-day i {
  margin: auto;
  color: rgba(93,98,94,.36);
  font-style: normal;
}

/* Favorite detail */
body.hk-detail-open {
  overflow: hidden;
}

.hk-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(27,31,29,.64);
  backdrop-filter: blur(8px);
}

.hk-detail-panel {
  position: relative;
  width: min(100%, 360px);
  max-height: min(760px, 92vh);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 16px;
  background: var(--hk-paper);
  box-shadow: 0 26px 80px rgba(0,0,0,.28);
  text-align: center;
}

.hk-detail-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  background: rgba(39,43,42,.68);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

.hk-detail-panel > img {
  display: block;
  width: 100%;
  height: min(44vh, 330px);
  border-radius: 10px;
  object-fit: cover;
}

.hk-detail-meta {
  margin: 14px 0 4px;
  color: var(--hk-sage);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
}

.hk-detail-panel h3 {
  margin: 0;
  color: var(--hk-ink);
  font-family: Georgia, "Noto Serif Thai", "Times New Roman", serif;
  font-size: 1.55rem;
}

.hk-detail-profile {
  display: grid;
  margin-top: 13px;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 6px;
}

.hk-detail-profile p {
  margin: 0;
  padding: 7px 4px;
  border: 1px solid var(--hk-line);
  border-radius: 7px;
}

.hk-detail-profile span,
.hk-detail-profile strong {
  display: block;
}

.hk-detail-profile span {
  color: var(--hk-sage);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .42rem;
  letter-spacing: .06em;
}

.hk-detail-profile strong {
  margin-top: 3px;
  color: var(--hk-ink-soft);
  font-size: .56rem;
}

.hk-detail-message {
  margin: 15px 0 0;
  padding: 13px 8px;
  border-block: 1px solid var(--hk-line);
  color: var(--hk-ink);
  font-family: Georgia, "Noto Serif Thai", "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.hk-detail-comment {
  margin: 12px 0 0;
  color: var(--hk-ink-soft);
  font-size: .74rem;
  font-weight: 650;
  line-height: 1.45;
}

.hk-share-note {
  color: var(--hk-ink-soft);
  font-size: .68rem;
}

/* Motion */
.hk-friend-card.is-revealed {
  animation: hkReveal 430ms var(--hk-ease) both;
}

.hk-friend-card.is-revealed .hk-photo-slot {
  animation: hkStageIn 360ms var(--hk-ease) 60ms both;
}

.hk-friend-card.is-revealed .hk-cat-name,
.hk-friend-card.is-revealed .hk-cat-meta,
.hk-friend-card.is-revealed .hk-cat-profile {
  animation: hkStageIn 340ms var(--hk-ease) 190ms both;
}

.hk-friend-card.is-revealed .hk-cat-message {
  animation: hkStageIn 360ms var(--hk-ease) 320ms both;
}

.hk-friend-card.is-revealed .hk-pakai-comment {
  animation: hkStageIn 360ms var(--hk-ease) 440ms both;
}

.hk-friend-card.is-opening {
  animation: hkOpen 720ms var(--hk-ease) both;
}

@keyframes hkReveal {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hkStageIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hkOpen {
  0% { opacity: .7; transform: translateY(8px) rotateY(0) scale(.985); }
  46% { opacity: 1; transform: translateY(0) rotateY(82deg) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) rotateY(0) scale(1); }
}

@keyframes hkPakaiBreathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.015); }
}

@keyframes hkCardIdle {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-4px) rotate(-.4deg); }
}

@keyframes hkSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 380px) {
  .hk-cat-widget {
    padding-inline: 8px;
  }

  .hk-title-screen {
    padding: 20px 14px 18px;
  }

  .hk-pakai-navi {
    gap: 9px;
    padding-right: 10px;
  }

  .hk-cat-intro {
    font-size: .61rem;
  }

  .hk-pakai-comment {
    grid-template-columns: 39px minmax(0, 1fr);
  }

  .hk-pakai-comment-image {
    width: 39px;
    height: 39px;
  }

  .hk-history-list {
    grid-template-columns: 1fr;
  }

  .hk-cat-profile strong {
    font-size: .43rem;
  }

  .hk-diary-list {
    gap: 3px;
  }

  .hk-diary-day img {
    width: 26px;
    height: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   Plakai Friends v39 — Editorial Tech motion layer
========================================================= */

.hk-cat-widget {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hk-cat-widget::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .26;
  background-image:
    linear-gradient(rgba(104,123,109,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104,123,109,.09) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
  animation: hkGridDrift 12s linear infinite;
}

.hk-tech-ambient {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hk-tech-ambient span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(104,123,109,.34);
  box-shadow: 0 0 10px rgba(104,123,109,.26);
  animation: hkParticleFloat 7s ease-in-out infinite;
}

.hk-tech-ambient span:nth-child(1) { left: 9%; top: 12%; animation-delay: -1s; }
.hk-tech-ambient span:nth-child(2) { left: 84%; top: 20%; animation-delay: -4s; }
.hk-tech-ambient span:nth-child(3) { left: 17%; top: 47%; animation-delay: -2.5s; }
.hk-tech-ambient span:nth-child(4) { left: 91%; top: 58%; animation-delay: -5.3s; }
.hk-tech-ambient span:nth-child(5) { left: 7%; top: 79%; animation-delay: -3.4s; }
.hk-tech-ambient span:nth-child(6) { left: 76%; top: 91%; animation-delay: -.5s; }

.hk-energy-path {
  position: relative;
  width: 72%;
  height: 2px;
  margin: 10px auto -2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(104,123,109,.10);
}

.hk-energy-path span {
  position: absolute;
  top: 0;
  left: -35%;
  width: 32%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #8eb8a0, transparent);
  opacity: 0;
  box-shadow: 0 0 8px rgba(104,123,109,.54);
}

.hk-energy-path.is-routing span {
  opacity: 1;
  animation: hkEnergyRoute 680ms var(--hk-ease) both;
}

.hk-cat-button.is-synced {
  animation: hkButtonSync 520ms var(--hk-ease) both;
}

/* Search radar */
.hk-full-loading {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 34%, rgba(104,123,109,.13), transparent 38%),
    linear-gradient(180deg, #f5f2eb, #eae5dc);
}

.hk-full-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .34;
  background:
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(35,53,72,.035) 8px),
    linear-gradient(90deg, transparent, rgba(104,123,109,.08), transparent);
  animation: hkLoadingScan 2.2s linear infinite;
}

.hk-full-loading-box {
  position: relative;
  z-index: 2;
}

.hk-radar {
  position: absolute;
  top: -24px;
  left: 50%;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(104,123,109,.25);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 31%, rgba(104,123,109,.12) 32% 32.8%, transparent 33.5% 64%, rgba(104,123,109,.10) 65% 65.8%, transparent 66.5%),
    linear-gradient(90deg, transparent 49.6%, rgba(104,123,109,.14) 50%, transparent 50.4%),
    linear-gradient(transparent 49.6%, rgba(104,123,109,.14) 50%, transparent 50.4%);
  transform: translateX(-50%);
}

.hk-radar-sweep {
  position: absolute;
  inset: 50% 50% 0 0;
  border-radius: 100% 0 0 0;
  background: conic-gradient(from 270deg, rgba(104,123,109,.46), transparent 40deg);
  transform-origin: 100% 0;
  animation: hkRadarSweep 1.65s linear infinite;
}

.hk-radar-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #87a995;
  box-shadow: 0 0 10px #87a995;
  animation: hkRadarPing 1.6s ease-in-out infinite;
}

.hk-radar-dot.dot-one { left: 29%; top: 37%; }
.hk-radar-dot.dot-two { left: 69%; top: 57%; animation-delay: -.6s; }
.hk-radar-dot.dot-three { left: 47%; top: 75%; animation-delay: -1.1s; }

.hk-full-loading-pakai {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 12px 18px rgba(35,53,72,.16));
}

.hk-scan-step {
  margin: 12px 0 7px !important;
  color: var(--hk-sage);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .61rem !important;
  font-weight: 750 !important;
  letter-spacing: .12em;
}

.hk-scan-progress {
  width: 190px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(35,53,72,.10);
}

.hk-scan-progress span {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hk-sage), #a7cab4);
  box-shadow: 0 0 10px rgba(104,123,109,.5);
  transition: width 320ms var(--hk-ease);
}

/* Card technology layer and tilt */
.hk-friend-card {
  --hk-tilt-x: 0deg;
  --hk-tilt-y: 0deg;
  --hk-glare-x: 50%;
  --hk-glare-y: 50%;
  transform: perspective(1100px) rotateX(var(--hk-tilt-x)) rotateY(var(--hk-tilt-y));
  transition: transform 260ms var(--hk-ease), box-shadow 260ms ease;
  will-change: transform;
}

.hk-friend-card.is-tilting {
  box-shadow: 0 28px 70px rgba(31,35,33,.19);
  transition: transform 70ms linear, box-shadow 180ms ease;
}

.hk-card-tech-fx {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.hk-card-circuit {
  position: absolute;
  inset: 0;
  opacity: .13;
  background:
    linear-gradient(90deg, transparent 7%, var(--hk-rarity) 7.2% 7.45%, transparent 7.7% 92%, var(--hk-rarity) 92.2% 92.45%, transparent 92.7%),
    linear-gradient(transparent 4.2%, var(--hk-rarity) 4.4% 4.55%, transparent 4.75% 94%, var(--hk-rarity) 94.2% 94.35%, transparent 94.55%);
}

.hk-card-scanline {
  position: absolute;
  top: -18%;
  left: 5%;
  width: 90%;
  height: 14%;
  opacity: 0;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--hk-rarity) 24%, transparent), transparent);
}

.hk-friend-card.is-revealed .hk-card-scanline {
  animation: hkCardScan 900ms ease-out 80ms both;
}

.hk-rarity-ring {
  position: absolute;
  inset: 7px;
  border: 1px solid transparent;
  border-radius: 13px;
}

.hk-friend-card.is-rare.is-revealed .hk-rarity-ring,
.hk-friend-card.is-epic.is-revealed .hk-rarity-ring,
.hk-friend-card.is-legendary.is-revealed .hk-rarity-ring {
  border-color: color-mix(in srgb, var(--hk-rarity) 55%, transparent);
  animation: hkRarityPulse 760ms var(--hk-ease) 150ms both;
}

.hk-friend-card.is-legendary.is-revealed .hk-rarity-ring {
  border-width: 2px;
  background: conic-gradient(from 0deg, transparent, rgba(211,170,77,.18), transparent 22%, transparent 70%, rgba(211,170,77,.16), transparent);
  animation: hkLegendaryOrbit 1.25s var(--hk-ease) both;
}

.hk-card-glare {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at var(--hk-glare-x) var(--hk-glare-y), rgba(255,255,255,.24), transparent 34%);
  transition: opacity 180ms ease;
}

.hk-friend-card.is-tilting .hk-card-glare {
  opacity: 1;
}

/* Digital photo decode */
.hk-cat-image.is-decoding {
  animation: hkPhotoDecode 820ms steps(10, end) both;
}

.hk-cat-profile p {
  position: relative;
  overflow: hidden;
}

.hk-cat-profile p::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(104,123,109,.24);
}

.hk-cat-profile p.is-verified::after {
  background: #75a186;
  box-shadow: 0 0 7px rgba(117,161,134,.72);
  animation: hkVerified 360ms var(--hk-ease) both;
}

.hk-cat-profile strong {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

/* Data-log history */
.hk-history-list {
  position: relative;
  grid-template-columns: 1fr;
  padding-left: 12px;
}

.hk-history-list::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 1px;
  background: linear-gradient(var(--hk-sage), rgba(104,123,109,.08));
}

.hk-history-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -13px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--hk-paper);
  border-radius: 50%;
  background: var(--hk-sage);
  box-shadow: 0 0 8px rgba(104,123,109,.38);
  transform: translateY(-50%);
}

.hk-history-copy p {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: .025em;
}

@keyframes hkGridDrift {
  to { background-position: 28px 28px; }
}

@keyframes hkReveal {
  from {
    opacity: 0;
    transform: perspective(1100px) translateY(12px) scale(.985) rotateX(var(--hk-tilt-x)) rotateY(var(--hk-tilt-y));
  }
  to {
    opacity: 1;
    transform: perspective(1100px) translateY(0) scale(1) rotateX(var(--hk-tilt-x)) rotateY(var(--hk-tilt-y));
  }
}

@keyframes hkOpen {
  0% { opacity: .7; transform: perspective(1100px) translateY(8px) rotateY(0) scale(.985); }
  46% { opacity: 1; transform: perspective(1100px) translateY(0) rotateY(82deg) scale(1.01); }
  100% { opacity: 1; transform: perspective(1100px) translateY(0) rotateX(var(--hk-tilt-x)) rotateY(var(--hk-tilt-y)) scale(1); }
}

@keyframes hkParticleFloat {
  0%, 100% { opacity: .18; transform: translate3d(0,0,0) scale(.75); }
  50% { opacity: .62; transform: translate3d(5px,-16px,0) scale(1); }
}

@keyframes hkEnergyRoute {
  from { transform: translateX(0); }
  to { transform: translateX(420%); }
}

@keyframes hkButtonSync {
  0%, 100% { box-shadow: 0 9px 22px rgba(35,53,72,.20); }
  50% { box-shadow: 0 9px 28px rgba(104,123,109,.42), inset 0 0 0 1px rgba(151,193,169,.42); }
}

@keyframes hkLoadingScan {
  from { background-position: 0 -40px, -180px 0; }
  to { background-position: 0 40px, 180px 0; }
}

@keyframes hkRadarSweep {
  to { transform: rotate(360deg); }
}

@keyframes hkRadarPing {
  0%, 100% { opacity: .18; transform: scale(.6); }
  45% { opacity: 1; transform: scale(1.35); }
}

@keyframes hkCardScan {
  0% { top: -18%; opacity: 0; }
  16% { opacity: .65; }
  100% { top: 104%; opacity: 0; }
}

@keyframes hkRarityPulse {
  0% { opacity: 0; transform: scale(.97); }
  50% { opacity: 1; }
  100% { opacity: .46; transform: scale(1); }
}

@keyframes hkLegendaryOrbit {
  0% { opacity: 0; transform: rotate(-12deg) scale(.97); }
  45% { opacity: 1; }
  100% { opacity: .64; transform: rotate(360deg) scale(1); }
}

@keyframes hkPhotoDecode {
  0% { opacity: 0; filter: blur(16px) saturate(.2); clip-path: inset(0 0 92% 0); transform: scale(1.035); }
  28% { opacity: .72; filter: blur(8px) saturate(.55); clip-path: inset(0 0 54% 0); }
  56% { clip-path: inset(28% 0 18% 0); transform: translateX(2px) scale(1.018); }
  70% { clip-path: inset(0); transform: translateX(-1px) scale(1.01); }
  100% { opacity: 1; filter: blur(0) saturate(1); clip-path: inset(0); transform: translateX(0) scale(1); }
}

@keyframes hkVerified {
  from { opacity: 0; transform: scale(2); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hk-cat-widget::before,
  .hk-tech-ambient span,
  .hk-radar-sweep,
  .hk-radar-dot,
  .hk-full-loading::before {
    animation: none !important;
  }

  .hk-friend-card {
    transform: none !important;
  }
}

/* Original cat artwork note */
.hk-provider-note {
  width: min(100%, 690px);
  margin: 22px auto 0;
  padding: 14px 16px;
  color: #4f5e69;
  background: rgba(250, 247, 240, .88);
  border: 1px solid rgba(39, 59, 72, .14);
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
}

.hk-provider-note p {
  margin: 0;
}

.hk-provider-note a {
  color: #284a5f;
  font-weight: 700;
  text-underline-offset: 2px;
}

.hk-provider-note details {
  margin-top: 7px;
  text-align: left;
}

.hk-provider-note summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #284a5f;
  font-weight: 700;
}

.hk-provider-note details p {
  margin-top: 8px;
}
