.puku-gaze-glitch-loop .puku-avatar {
  position: relative;
  animation: pukuGazeSignalDrift 1.45s steps(3, end) infinite;
  filter: contrast(1.15) saturate(0.9);
}

.puku-gaze-glitch-loop .puku-avatar::after {
  content: "";
}

@keyframes pukuGazeSignalDrift {
  0%, 100% {
    transform: translate(0, 0) skewX(0deg);
    filter: contrast(1.15) saturate(0.9);
  }
  18% {
    transform: translate(-1px, 0) skewX(-1deg);
    filter: contrast(1.22) saturate(0.72) hue-rotate(-6deg);
  }
  36% {
    transform: translate(2px, 0) skewX(1.5deg);
    filter: contrast(1.3) saturate(0.82) hue-rotate(5deg);
  }
  52% {
    transform: translate(-2px, 1px) skewX(-1deg);
    filter: contrast(1.18) saturate(0.65);
  }
  70% {
    transform: translate(1px, -1px) skewX(0.8deg);
    filter: contrast(1.26) saturate(0.78) hue-rotate(4deg);
  }
  86% {
    transform: translate(0, 0) skewX(0deg);
    filter: contrast(1.12) saturate(0.9);
  }
}

.arai-plugin-news span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.record-speaker-feedback-toast {
  position: fixed;
  z-index: 10020;
  left: 50%;
  bottom: 34px;
  max-width: min(88vw, 520px);
  padding: 13px 20px;
  border-radius: 10px;
  background: rgba(22, 28, 38, 0.94);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  font: 600 14px/1.6 "Microsoft YaHei", "Noto Sans SC", sans-serif;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.record-speaker-feedback-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.arai-plugin-card {
  cursor: pointer;
}

.arai-name-bordered {
  display: inline-block;
  padding: 3px 8px;
  border: 2px solid #000;
}

.kay-eyes-card .name {
  position: relative;
}

.kay-eyes-overlay {
  position: absolute;
  z-index: 40;
  top: 50%;
  left: 50%;
  width: 114px !important;
  height: auto !important;
  aspect-ratio: auto !important;
  max-width: none;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  background: transparent !important;
}

@media (max-width: 520px) {
  .kay-eyes-overlay {
    width: 95px !important;
  }
}

.arai-plugin-card img {
  filter: grayscale(1) contrast(1.08);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.arai-plugin-card:hover img {
  filter: grayscale(1) contrast(1.22) brightness(0.88);
  transform: translateY(-3px);
}

.arai-plugin-gaze .puku-launcher,
.arai-plugin-gaze .puku-launcher img {
  transition: none !important;
}

.arai-plugin-gaze .puku-launcher:hover,
.arai-plugin-gaze .puku-launcher:hover img {
  transform: none !important;
  filter: none !important;
}

.arai-puku-flash-clone {
  position: fixed;
  z-index: 9999;
  box-sizing: border-box;
  border: 4px solid #ff002f;
  background-color: #050505;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 76%;
  pointer-events: none;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.18), 0 0 28px rgba(255, 0, 47, 0.92);
  animation: araiPukuSystemError 1.08s steps(1, end) 1;
}

.arai-puku-flash-clone::before {
  content: "SYSTEM ERROR";
  position: absolute;
  left: 50%;
  bottom: -30px;
  transform: translateX(-50%);
  padding: 4px 8px;
  color: #fff;
  background: #ff002f;
  font: 900 11px/1 Consolas, "Courier New", monospace;
  letter-spacing: 0.12em;
  white-space: nowrap;
  animation: araiPukuErrorText 1.08s steps(1, end) 1;
}

.arai-puku-flash-clone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.45) 0 2px, transparent 2px 5px);
  mix-blend-mode: overlay;
  animation: araiPukuScan 0.12s steps(2, end) infinite;
}

@keyframes araiPukuSystemError {
  0% { opacity: 1; filter: contrast(2.8) saturate(0) invert(1); transform: scale(1); }
  8% { opacity: 0; filter: none; transform: scale(1.16); }
  14% { opacity: 1; filter: contrast(3.2) saturate(4); transform: scale(0.92); }
  20% { opacity: 0.08; filter: invert(1) grayscale(1); transform: scale(1.22); }
  28% { opacity: 1; filter: contrast(4) brightness(1.8); transform: scale(1); }
  36% { opacity: 0; filter: none; transform: scale(1.28); }
  44% { opacity: 1; filter: invert(1) contrast(4); transform: scale(0.88); }
  52% { opacity: 0.16; filter: saturate(0) contrast(5); transform: scale(1.34); }
  64% { opacity: 1; filter: contrast(3.8) saturate(5); transform: scale(1.04); }
  76% { opacity: 0; filter: none; transform: scale(1.42); }
  84% { opacity: 1; filter: invert(1) contrast(5) brightness(2); transform: scale(0.96); }
  92% { opacity: 0.22; filter: grayscale(1); transform: scale(1.2); }
  100% { opacity: 0; filter: none; transform: scale(1.46); }
}

@keyframes araiPukuErrorText {
  0%, 20%, 44%, 64%, 84% { opacity: 1; }
  8%, 36%, 76%, 100% { opacity: 0; }
}

@keyframes araiPukuScan {
  0% { transform: translateY(-3px); }
  100% { transform: translateY(3px); }
}

.arai-docs-reset {
  margin-left: auto;
  padding: 9px 18px;
  border: 1px solid #d5d9e0;
  border-radius: 8px;
  background: #fff;
  color: #536070;
  font: 600 13px/1 "Microsoft YaHei", sans-serif;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.arai-docs-reset:hover {
  border-color: #8c99aa;
  background: #f6f8fb;
  color: #1f2937;
}

.peer-record-active {
  position: relative;
}

.peer-bg-trigger {
  position: absolute;
  bottom: 0;
  z-index: 10000;
  width: 450px;
  height: 600px;
  border: 0;
  padding: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 1;
  cursor: default;
  transition: visibility 0.24s ease, opacity 0.24s ease;
}

.peer-bg-trigger-left {
  left: 0;
  background-image: url("../images/Arcimboldo.png");
  background-position: bottom left;
}

.peer-bg-trigger-right {
  right: 0;
  background-image: url("../images/Utagawa.png");
  background-position: bottom right;
}

.peer-bg-trigger:hover {
  cursor: default;
}

.peer-bg-scrolling .peer-bg-trigger {
  visibility: hidden;
  opacity: 0;
}

@media (max-width: 1024px) {
  .peer-record-active .peer-bg-trigger {
    position: fixed;
    bottom: 0;
    width: min(42vw, 360px);
    height: min(56vw, 480px);
    background-size: contain;
  }

  .peer-record-active .peer-bg-trigger-left {
    left: 0;
    right: auto;
  }

  .peer-record-active .peer-bg-trigger-right {
    right: 0;
    left: auto;
  }
}

.arai-record-line {
  white-space: pre-line;
}

.arai-hidden-word {
  visibility: hidden;
  font-weight: 900;
}

.arai-floating-word {
  position: fixed;
  z-index: 80;
  color: #111;
  font-weight: 900;
  font-size: 20px;
  pointer-events: none;
  transform-origin: center;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  will-change: transform;
}

.arai-floating-word:nth-child(2) {
  animation-delay: 0.8s;
}

.arai-floating-word:nth-child(3) {
  animation-delay: 1.6s;
}

@media (max-width: 520px) {
  .arai-floating-word-phone {
    z-index: 180;
    max-width: 30vw;
    font-size: 16px;
    white-space: nowrap;
    transform-origin: center;
  }
}

.arai-news-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15, 25, 42, 0.42);
}

.arai-news-dialog {
  width: min(100%, 760px);
  max-height: min(84vh, 820px);
  overflow: auto;
  padding: 42px 46px;
  border: 1px solid rgba(205, 220, 236, 0.86);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 68px rgba(27, 48, 72, 0.22);
}

.arai-news-dialog h3 {
  margin: 0 0 12px;
  color: #172238;
  font-size: 24px;
  line-height: 1.45;
}

.arai-news-dialog time {
  display: block;
  margin-bottom: 30px;
  color: #7f8794;
  font: 13px Georgia, "Times New Roman", serif;
  letter-spacing: 0.1em;
}

.arai-news-dialog p {
  margin: 0 0 20px;
  color: #2d384d;
  font-size: 14px;
  line-height: 2.05;
}

.arai-news-dialog .arai-news-signature {
  text-align: right;
  font-weight: 700;
}

.arai-news-close {
  display: inline-flex;
  margin-top: 14px;
  min-width: 96px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: #1e2940;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

@keyframes araiFloatGrow {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    letter-spacing: 0.04em;
  }
  100% {
    transform: translate3d(18px, -46px, 0) scale(3.8);
    letter-spacing: 0.16em;
  }
}

.arai-docs-page {
  min-height: 100vh;
  background: #fff;
  color: #202124;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

.arai-docs-shell {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 28px 18px 80px;
}

.arai-docs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 18px;
  border-bottom: 1px solid #e0e0e0;
}

.arai-docs-header h1 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 500;
}

.arai-docs-header p {
  margin: 0;
  color: #5f6368;
  font-size: 13px;
}

.arai-docs-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr 42px;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  padding: 0 8px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 13px;
  transition: background 0.12s ease;
}

.arai-docs-row:hover {
  background: #e8f0fe;
}

.arai-docs-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
}

.arai-docs-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.arai-docs-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.arai-docs-more {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.arai-docs-more:hover,
.arai-docs-add:hover {
  background: #f1f3f4;
}

.arai-docs-menu,
.arai-docs-add-menu {
  position: absolute;
  z-index: 30;
  min-width: 150px;
  padding: 8px 0;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(60, 64, 67, 0.22);
}

.arai-docs-menu {
  right: 8px;
  top: 42px;
}

.arai-docs-menu button,
.arai-docs-add-menu button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: #202124;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
}

.arai-docs-menu button:hover,
.arai-docs-add-menu button:hover {
  background: #f1f3f4;
}

.arai-docs-add {
  position: fixed;
  right: 28px;
  bottom: 26px;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  color: #4285f4;
  background: #fff;
  box-shadow: 0 3px 12px rgba(60, 64, 67, 0.32);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.arai-docs-add-menu {
  position: fixed;
  right: 28px;
  bottom: 90px;
}

.arai-docs-empty {
  padding: 42px 8px;
  color: #5f6368;
  font-size: 13px;
}

.arai-docs-password-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 18px;
}

.arai-docs-gate-hint {
  margin: 0;
  color: #5f6368;
  font-size: 14px;
}

.arai-docs-gate-form {
  display: flex;
  gap: 8px;
}

.arai-docs-gate-form input {
  width: 220px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #dadce0;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.arai-docs-gate-form input:focus {
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.18);
}

.arai-docs-gate-form button {
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #4285f4;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.arai-docs-gate-error {
  margin: 0;
  min-height: 20px;
  color: #d93025;
  font-size: 12px;
}

@media (max-width: 1024px) {
  .yanagihara-docs-page {
    overflow-x: hidden;
  }

  .yanagihara-docs-page #yanagiharaDocsInner:not([hidden]) {
    display: contents;
  }

  .yanagihara-docs-page .arai-docs-password-gate {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .yanagihara-docs-page .arai-docs-gate-form {
    width: 100%;
    max-width: 340px;
  }

  .yanagihara-docs-page .arai-docs-gate-form input {
    width: auto;
    min-width: 0;
    flex: 1;
  }

  .yanagihara-docs-page .arai-docs-gate-form button {
    flex: 0 0 auto;
    padding: 0 14px;
  }
}

.spuku-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

.spuku-dialog {
  width: min(520px, 90vw);
  padding: 32px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transition: background 0.3s ease, color 0.3s ease;
}

.spuku-dialog-denied {
  background: #0a0a0a;
  color: #e02020;
}

.spuku-dialog-denied .spuku-dialog-text p {
  color: #e02020;
}

.spuku-dialog-body {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.spuku-dialog-img {
  width: 96px;
  height: auto;
  flex-shrink: 0;
  border-radius: 8px;
}

.spuku-dialog-text p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.7;
  color: #333;
}

.spuku-dialog-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
}

.spuku-btn {
  min-width: 80px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.spuku-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.spuku-btn.is-click-feedback {
  transform: translateY(2px) scale(0.96);
  filter: brightness(0.88);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.22);
}

.spuku-btn-yes {
  color: #fff;
  background: #4285f4;
}

.spuku-btn-no {
  color: #333;
  background: #e8e8e8;
}

.spuku-clione {
  position: fixed;
  width: 68px;
  height: auto;
  z-index: 10000;
  pointer-events: none;
}
