:root{
  /* Pinot palette (HSL) */
  --theme-bourgogne: 352 72% 52%;
  --theme-bourgogne-light: 352 62% 62%;
  --theme-bourgogne-hover: 352 72% 47%;
  --theme-bordeaux: 345 85% 15%;
  --theme-bordeaux-light: 345 85% 20%;
  --theme-bordeaux-hover: 345 85% 12%;
  --theme-pinot: 15 60% 12%;
  --theme-pinot-light: 15 50% 18%;
  --theme-pinot-hover: 15 60% 8%;
  --theme-rose-mist: 350 100% 97%;
  --theme-rose-mist-light: 350 100% 98%;
  --theme-gold: 45 90% 60%;
  --theme-gold-light: 45 80% 85%;
  --theme-dark-base: 15 23% 8%;
  --theme-dark-secondary: 345 85% 12%;
  --theme-dark-tertiary: 25 40% 15%;
  --theme-wine: 345 60% 25%;
  --theme-brown: 25 50% 30%;
  --theme-pink: 340 100% 97%;
  --theme-pink-darker: 340 25% 94%;
  --theme-burgundy: 345 85% 15%;
  --theme-burgundy-light: 345 85% 20%;
  --theme-burgundy-main: 0 55% 50%;
  --theme-burgundy-main-hover: 0 55% 45%;
  --theme-mint: 150 70% 94%;
}
/* Tailwind-like utility shortcuts */
.bg-theme-bourgogne{ background-color: hsl(var(--theme-bourgogne)); }
.bg-theme-bourgogne-light{ background-color: hsl(var(--theme-bourgogne-light)); }
.bg-theme-bordeaux{ background-color: hsl(var(--theme-bordeaux)); }
.bg-theme-bordeaux-light{ background-color: hsl(var(--theme-bordeaux-light)); }
.bg-theme-pinot{ background-color: hsl(var(--theme-pinot)); }
.bg-theme-pinot-light{ background-color: hsl(var(--theme-pinot-light)); }
.bg-theme-rose-mist{ background-color: hsl(var(--theme-rose-mist)); }
.bg-theme-gold{ background-color: hsl(var(--theme-gold)); }
.bg-theme-dark-base{ background-color: hsl(var(--theme-dark-base)); }
.bg-theme-wine{ background-color: hsl(var(--theme-wine)); }
.text-theme-bourgogne{ color: hsl(var(--theme-bourgogne)); }
.text-theme-bordeaux{ color: hsl(var(--theme-bordeaux)); }
.text-theme-pinot{ color: hsl(var(--theme-pinot)); }
.text-theme-gold{ color: hsl(var(--theme-gold)); }
.border-theme-bordeaux{ border-color: hsl(var(--theme-bordeaux)); }
.border-theme-pinot{ border-color: hsl(var(--theme-pinot)); }
.hover\:bg-theme-bourgogne-hover:hover{ background-color: hsl(var(--theme-bourgogne-hover)); }
.hover\:bg-theme-bordeaux-hover:hover{ background-color: hsl(var(--theme-bordeaux-hover)); }
.hover\:bg-theme-pinot-hover:hover{ background-color: hsl(var(--theme-pinot-hover)); }
html, body{height:100%; margin:0; padding:0; overflow:hidden}
body{font-family:"Atkinson Hyperlegible", "Noto Sans JP", system-ui, sans-serif; padding:16px; display:flex; flex-direction:column; min-height:0; box-sizing:border-box}
#msgs{border:1px solid #ddd; border-radius:8px; padding:8px; flex:1; min-height:0; overflow:auto; background:#fff; font-size:13px; line-height:1.55}
.row{display:flex; gap:8px; margin-top:8px}
.card{ background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:12px; box-shadow:0 4px 16px rgba(0,0,0,.06); }
.card h3{ margin:0; font-weight:600; }
.card .row{ margin-top:6px; }
/* Dashboard grid & equal-size cards */
#dashboardRow{ display:grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap:12px; align-items:stretch; }
.card-dash{ height: 320px; display:flex; flex-direction:column; }
.card-dash > *:last-child{ margin-top:8px; }
.msg{margin:6px 0; position:relative; font-size:13px}
/* Pinot chat colors */
.label-assistant{ color: hsl(var(--theme-pinot)); font-weight:600 }
.label-user{ color: hsl(var(--theme-bourgogne)); font-weight:600 }
.msg.assistant .md{ color: hsl(var(--theme-pinot-light)); }
.msg.user .md{ color: hsl(var(--theme-bourgogne-light)); }
input,textarea,button{padding:8px}
textarea#inp{
  min-height:44px !important; 
  max-height:180px !important; 
  resize:vertical !important; 
  line-height:1.4 !important;
  border:1px solid hsl(345, 85%, 15%) !important;
  border-radius:6px !important;
  box-sizing:border-box !important;
}
textarea#inp:focus{
  outline:none !important;
  border-color:hsl(345, 85%, 12%) !important;
  box-shadow:0 0 0 3px hsla(345, 85%, 15%, 0.1) !important;
}
.copy-btn{ position:absolute; top:4px; right:6px; width:24px; height:24px; display:flex; align-items:center; justify-content:center; background:transparent; border:none; cursor:pointer; opacity:0.6; transition:opacity .15s ease; }
.copy-btn:hover{ opacity:1 }
.copy-btn svg{ width:18px; height:18px; fill:#666 }
/* Markdown styles */
.md { color:#222; }
.md p{ margin:6px 0; }
/* Code block theming (Pinot) */
.md pre{ background:hsl(var(--theme-dark-base)); border:1px solid hsl(var(--theme-dark-secondary)); padding:10px; border-radius:8px; overflow:auto; }
.md pre code{ background:transparent; color:#EDEDED; font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height:1.5; font-size:13px; }
.md code{ background:hsl(var(--theme-dark-base)); color:#EDEDED; border-radius:4px; padding:2px 4px; font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:13px; }
/* Global hljs token colors (fallback if theme not applied) */
.hljs { color:#EDEDED; }
.hljs-keyword,.hljs-selector-tag,.hljs-literal { color:hsl(var(--theme-gold)); }
.hljs-built_in,.hljs-type { color:#a78bfa; }
.hljs-title,.hljs-section,.hljs-function .hljs-title { color:hsl(var(--theme-bourgogne)); }
.hljs-string,.hljs-attr,.hljs-template-variable { color:hsl(var(--theme-bourgogne-light)); }
.hljs-number,.hljs-symbol,.hljs-meta { color:#60a5fa; }
.hljs-comment,.hljs-quote { color:rgba(255,255,255,.55); font-style:italic; }
/* Syntax accents */
.md .hljs-keyword, .md .hljs-selector-tag { color:hsl(var(--theme-gold)); }
.md .hljs-function .hljs-title, .md .hljs-title { color:hsl(var(--theme-bourgogne)); }
.md .hljs-string, .md .hljs-attr, .md .hljs-template-variable { color:hsl(var(--theme-bourgogne-light)); }
.md .hljs-number, .md .hljs-literal, .md .hljs-symbol { color:#a5b4fc; }
.md .hljs-comment, .md .hljs-quote { color:rgba(255,255,255,.55); font-style:italic; }
.md table{ border-collapse: collapse; margin:8px 0; }
.md th,.md td{ border:1px solid #ddd; padding:6px 8px; }
.md th{ background:#fafafa; }
/* Small text utility */
.small{ font-size:12px; line-height:1.4 }
/* TaskPane thinking indicator */
.spinner{ width:12px; height:12px; border:2px solid hsl(var(--theme-bourgogne)); border-top-color:transparent; border-radius:50%; display:inline-block; animation:spin .8s linear infinite; margin-right:6px }
@keyframes spin{ to{ transform:rotate(360deg) } }
.thinking{ font-size:12px; color:hsl(var(--theme-bourgogne)); animation:blink 1.2s ease-in-out infinite }
@keyframes blink{ 0%{opacity:.2} 50%{opacity:1} 100%{opacity:.2} }
/* Progress indicator with heartbeat animation */
/* 考え中（thinking）の時だけ表示 */
.pinot-progress{ 
  display:none; /* デフォルトでは非表示 */
}
.pinot-progress.thinking{
  display:flex; /* 考え中のみ表示 */
  font-size:12px; 
  line-height:1.4; 
  color:hsl(var(--theme-bourgogne)); 
  margin-top:8px; 
  padding:8px 12px; 
  background-color:hsl(352, 30%, 97%); 
  border-left:3px solid hsl(var(--theme-bourgogne)); 
  border-radius:4px; 
  align-items:center; 
  gap:8px;
  animation:progressPulse 2s ease-in-out infinite;
}
/* 考え中（thinking）の時だけ●マーカーとハートビートアニメーションを表示 */
.pinot-progress.thinking::before{
  content:'●';
  color:hsl(var(--theme-bourgogne));
  font-size:10px;
  animation:heartbeat 1.5s ease-in-out infinite;
}
@keyframes progressPulse{
  0%, 100%{ background-color:hsl(352, 30%, 97%); border-left-color:hsl(var(--theme-bourgogne)); }
  50%{ background-color:hsl(352, 25%, 95%); border-left-color:hsl(var(--theme-bourgogne-hover)); }
}
@keyframes heartbeat{
  0%, 100%{ opacity:1; transform:scale(1); }
  50%{ opacity:0.6; transform:scale(1.2); }
}
/* pulse-strongクラスは使用しない（CSSアニメーションのみで統一） */

/* Proofreader icon slow blink animation */
@keyframes iconBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.proofreader-icon-blink {
  animation: iconBlink 2s ease-in-out infinite;
  display: inline-block;
}

/* ===== Aria Notification Styles ===== */

/* 通知コンテナ */
.aria-notification-container {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
}
.aria-notification-container.top-right {
  top: 20px;
  right: 20px;
}
.aria-notification-container.bottom-right {
  bottom: 20px;
  right: 20px;
}
.aria-notification-container.bottom-left {
  bottom: 20px;
  left: 20px;
}

/* ディスクリート通知 - エレガントなメッセージカード */
.aria-discreet {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #fdf2f4 0%, #f8e8eb 100%);
  color: #722f37;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.5px;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.4s ease-out;
  margin-bottom: 12px;
  box-shadow:
    0 4px 16px rgba(114, 47, 55, 0.15),
    0 1px 3px rgba(114, 47, 55, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(114, 47, 55, 0.15);
  position: relative;
}
/* エレガントな装飾ライン - ゴールド */
.aria-discreet::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 20px;
  right: 20px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, hsl(var(--theme-gold)), transparent);
}
.aria-discreet::after {
  content: '✦';
  position: absolute;
  top: 1px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: hsl(var(--theme-gold));
}
.aria-discreet:hover {
  background: linear-gradient(135deg, #fff5f7 0%, #fceef1 100%);
  box-shadow:
    0 6px 24px rgba(114, 47, 55, 0.2),
    0 2px 6px rgba(114, 47, 55, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
/* 通知テキスト - 強調 */
.aria-discreet-text {
  cursor: pointer;
  flex: 1;
  font-style: italic;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-weight: 600;
  font-size: 17px;
  color: hsl(var(--theme-bourgogne));
  letter-spacing: 1px;
}
.aria-discreet-text:hover {
  color: hsl(var(--theme-bourgogne-hover));
}
/* 消すボタン - bordeaux背景 + rose-mist文字 */
.aria-discreet-off {
  background: hsl(var(--theme-bordeaux));
  color: hsl(var(--theme-rose-mist));
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 400;
  font-style: italic;
  font-family: 'Georgia', 'Times New Roman', serif;
  cursor: pointer;
  margin-left: 20px;
  transition: all 0.2s;
  letter-spacing: 1px;
}
.aria-discreet-off:hover {
  background: hsl(var(--theme-bordeaux-hover));
}
.aria-discreet.visible {
  opacity: 1;
  transform: translateX(0);
}
.aria-discreet.dismissing {
  opacity: 0;
  transform: translateX(20px);
}

/* 詳細パネル */
.aria-detail-panel {
  position: fixed;
  z-index: 10001;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 280px;
  max-width: 360px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.25s ease-out;
}
.aria-detail-panel.top-right {
  top: 20px;
  right: 20px;
}
.aria-detail-panel.bottom-right {
  bottom: 20px;
  right: 20px;
}
.aria-detail-panel.visible {
  opacity: 1;
  transform: translateY(0);
}
.aria-detail-panel.dismissing {
  opacity: 0;
  transform: translateY(-10px);
}

/* 詳細パネル ヘッダー */
.aria-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}
.aria-detail-icon {
  margin-right: 6px;
}
.aria-detail-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.aria-detail-close:hover {
  color: #666;
}

/* 詳細パネル 本文 */
.aria-detail-body {
  padding: 16px;
}
.aria-detail-time-until {
  font-size: 12px;
  color: hsl(var(--theme-bourgogne));
  font-weight: 600;
  margin-bottom: 4px;
}
.aria-detail-time {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}
.aria-detail-title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin-bottom: 4px;
}
.aria-detail-location {
  font-size: 12px;
  color: #888;
}

/* 詳細パネル アクション */
.aria-detail-actions {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
}
.aria-detail-btn {
  padding: 14px 28px;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
  text-align: center;
}
.aria-detail-btn:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.aria-detail-btn.primary {
  background: hsl(var(--theme-bourgogne));
  color: #fff;
  border-color: hsl(var(--theme-bourgogne));
}
.aria-detail-btn.primary:hover {
  background: hsl(var(--theme-bourgogne-hover));
}
