/* tategaki.css - Vertical text (縦書き) styles for manga dialogue */

.dialogue-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-feature-settings: "vkrn" 1, "vpal" 1;
  line-height: 1.8;
  letter-spacing: 0.05em;
  font-size: 11px;
  color: #1a1a1a;
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 100%;
  overflow: hidden;
}

.dialogue-horizontal {
  writing-mode: horizontal-tb;
  font-size: 10px;
  color: #1a1a1a;
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.5;
  text-align: center;
  white-space: pre-wrap;
  max-width: 100%;
  overflow: hidden;
}

/* Speaker label inside bubble */
.dialogue__speaker {
  font-size: 8px;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 2px;
  color: #fff;
  margin-bottom: 2px;
  display: inline-block;
}

.dialogue-vertical .dialogue__speaker {
  writing-mode: horizontal-tb;
  margin-bottom: 0;
  margin-left: 2px;
}

/* Bubble container */
.dialogue-bubble {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 100%;
}

.dialogue-bubble--vertical {
  flex-direction: row-reverse;
}

/* Bubble types */
.bubble-normal {
  border: 1.5px solid #333;
  border-radius: 50%;
  padding: 6px 4px;
  background: rgba(255,255,255,0.9);
}

.bubble-thought {
  border: 1.5px dashed #666;
  border-radius: 50%;
  padding: 6px 4px;
  background: rgba(255,255,255,0.85);
}

.bubble-shout {
  border: 2.5px solid #111;
  border-radius: 4px;
  padding: 6px 4px;
  background: #fff;
}

.bubble-narration {
  border: 1px solid #999;
  border-radius: 2px;
  padding: 4px;
  background: rgba(240,240,240,0.9);
  font-style: italic;
}

.bubble-whisper {
  border: 1px solid #bbb;
  border-radius: 50%;
  padding: 6px 4px;
  background: rgba(255,255,255,0.7);
  font-size: 0.85em;
}

/* Punctuation adjustments for vertical text */
.dialogue-vertical {
  text-combine-upright: none;
}

/* Small numbers and latin in vertical text */
.dialogue-vertical .tcy {
  text-combine-upright: all;
}

/* Caption/narration box style */
.panel__caption {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 9px;
  padding: 3px 6px;
  text-align: center;
  pointer-events: none;
}
