/* src/ui-language.css */
.an-ui-region {
  display: contents;
}
html[data-ui-locale=my] body,
[lang=my] {
  font-family:
    "Noto Sans Myanmar",
    "Noto Sans KR",
    sans-serif;
}
[lang=my] button,
[lang=my] select,
[lang=my] p,
[lang=my] span,
[lang=my] label {
  line-height: 1.8;
}
.an-ui-language-controls {
  font-family:
    "Noto Sans KR",
    "Noto Sans Myanmar",
    sans-serif;
}
.an-ui-settings-open {
  position: fixed;
  z-index: 900;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: max(14px, calc((100vw - 980px)/2));
  display: flex;
  gap: 7px;
  align-items: center;
  border: 1px solid #dfd8f3;
  background: #fff;
  color: #6046bc;
  border-radius: 20px;
  padding: 8px 12px;
  min-height: 44px;
  font-size: 13px;
  box-shadow: 0 3px 12px #49337312;
}
.an-ui-modal-backdrop {
  position: fixed;
  inset: 0;
  background: #20143175;
  z-index: 4000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: max(18px, env(safe-area-inset-top, 0px)) 16px max(18px, env(safe-area-inset-bottom, 0px));
  overflow: auto;
}
.an-ui-language-dialog {
  width: min(100%, 440px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 16px 60px #1c102b33;
  color: #302548;
}
.an-ui-language-dialog header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  justify-content: space-between;
}
.an-ui-language-dialog h2 {
  font-size: 20px;
  line-height: 1.7;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.an-ui-language-dialog header button,
.an-ui-storage-warning button {
  background: none;
  border: 0;
  font-size: 26px;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
}
.an-ui-language-dialog p {
  font-size: 14px;
  line-height: 1.9;
  color: #776a8b;
  margin: 12px 0 20px;
  overflow-wrap: anywhere;
}
.an-locale-setting {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
}
.an-locale-setting select {
  width: 100%;
  min-height: 50px;
  background: #f7f3fd;
  color: #463259;
  border: 1px solid #dfd7ee;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 16px;
  font-family:
    "Noto Sans Myanmar",
    "Noto Sans KR",
    sans-serif;
}
.an-ui-done {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: #7055d8;
  color: #fff;
  font-size: 16px;
  padding: 12px;
  line-height: 1.8;
}
.an-ui-warning,
.an-ui-language-dialog p.an-ui-warning {
  background: #fff8e6;
  padding: 12px;
  border-radius: 12px;
  color: #73572b;
  line-height: 1.8;
}
.an-ui-storage-warning {
  position: fixed;
  z-index: 3900;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: min(92vw, 460px);
  background: #fff8e6;
  border: 1px solid #ecdbb8;
  padding: 14px 18px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.8;
}
.an-locale-picker {
  position: relative;
  display: inline-flex;
  margin: 4px 0;
  align-self: flex-end;
  max-width: 100%;
  z-index: 20;
}
.an-locale-trigger {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 82px;
  border: 1px solid #ddd5ef;
  border-radius: 12px;
  background: #fff;
  color: #6046bb;
  padding: 8px 10px;
  font-size: 14px;
  font-family:
    "Noto Sans Myanmar",
    "Noto Sans KR",
    sans-serif;
  white-space: normal;
  line-height: 1.7;
}
.an-locale-options {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  min-width: 150px;
  background: #fff;
  padding: 6px;
  border: 1px solid #e5deef;
  border-radius: 14px;
  box-shadow: 0 8px 24px #33225522;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 60;
}
.an-locale-options button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #46345d;
  font-size: 15px;
  padding: 8px 12px;
  text-align: left;
  font-family:
    "Noto Sans Myanmar",
    "Noto Sans KR",
    sans-serif;
  line-height: 1.8;
}
.an-locale-options button[aria-pressed=true] {
  background: #ede6fa;
  color: #6044bd;
}
.an-locale-trigger:disabled,
.an-locale-options button:disabled,
.an-locale-setting select:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.face-panel {
  min-width: 0;
  overflow: auto;
}
.face-panel .face-label {
  overflow-wrap: anywhere;
  line-height: 1.85;
}
.face-panel .composer {
  flex-shrink: 0;
}
.face-panel .face-output {
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.face-panel .composer-row {
  gap: 7px;
}
.face-panel .composer textarea {
  font-family:
    "Noto Sans Myanmar",
    "Noto Sans KR",
    sans-serif;
  line-height: 1.8;
  min-height: 48px;
}
.face-panel .send-button {
  min-width: 44px;
  min-height: 44px;
}
.message-bubble .original,
.message-bubble .translation p {
  font-family:
    "Noto Sans Myanmar",
    "Noto Sans KR",
    sans-serif;
  line-height: 1.85;
}
.an-voice-status {
  font-size: 12px;
  line-height: 1.8;
  color: #7055d8;
  padding: 4px 8px;
}
@media (max-width: 800px) {
  .an-ui-settings-open {
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: 12px;
    padding: 7px 10px;
    font-size: 12px;
  }
  .an-ui-language-dialog {
    padding: 20px;
  }
  .device-shell {
    max-width: 480px;
  }
}
@media (max-width: 360px) {
  .an-ui-language-dialog {
    padding: 16px;
  }
  .an-ui-language-dialog h2 {
    font-size: 18px;
  }
  .face-panel {
    padding-left: 12px;
    padding-right: 12px;
  }
  .an-locale-trigger {
    padding: 6px 9px;
    font-size: 14px;
  }
}
.an-message-field-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .01em;
  margin: .2rem 0 .35rem;
  opacity: .78;
}
.an-preview-strip {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  max-width: 305px;
  padding: 10px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid #dbd0ee;
  border-radius: 12px;
  color: #574772;
  font: 11px/1.5 system-ui;
  box-shadow: 0 4px 20px #29194111;
}
.an-preview-strip strong,
.an-preview-strip > span {
  width: 100%;
}
.an-preview-strip button {
  padding: 4px 8px;
  border: 1px solid #e4daf4;
  border-radius: 7px;
  background: #fbf9ff;
  color: #513977;
}
.an-preview-strip label {
  display: flex;
  gap: 4px;
  align-items: center;
}
@media (max-width: 800px) {
  .an-preview-strip {
    position: static;
    max-width: none;
    margin: 6px 8px;
    padding: 6px;
    font-size: 10px;
    box-shadow: none;
  }
  .an-preview-strip > span {
    display: none;
  }
  .an-preview-strip strong {
    width: auto;
    font-size: 9px;
  }
  .an-preview-strip label {
    font-size: 9px;
  }
  .an-preview-strip ~ .app-shell-chat {
    height: calc(var(--app-height,100dvh) - 94px);
    min-height: 0;
  }
  .an-preview-strip ~ .app-shell .device-shell {
    min-height: 0;
  }
}
body:has(.an-ui-inline-settings) .an-ui-settings-open {
  display: none;
}
.an-ui-inline-settings {
  border: 0;
  background: #faf7ff;
  color: #6b4dd0;
  border-radius: 12px;
  min-width: 36px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  flex-shrink: 0;
}
.chat-header .chat-controls {
  gap: 4px;
}
.chat-header .user-meta {
  min-width: 0;
}
.chat-header .user-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-header > div {
  min-width: 0;
}
.chat-header > div strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.face-panel {
  min-height: 0;
}
.face-panel .face-output {
  min-height: 0;
  flex-shrink: 1;
}
@font-face {
  font-family: "Noto Sans Myanmar";
  font-style: normal;
  font-weight: 400;
  src: url("./fonts/NotoSansMyanmar-Regular-ORGQMWSA.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Myanmar";
  font-style: normal;
  font-weight: 700;
  src: url("./fonts/NotoSansMyanmar-Bold-2Z6QUEHO.ttf") format("truetype");
  font-display: swap;
}

/* src/voice/voice.css */
.voice-trigger {
  position: relative;
  flex-direction: column;
  min-width: 48px !important;
  min-height: 52px !important;
  height: auto !important;
  gap: 2px;
}
.voice-trigger-language {
  font: 9px/1.4 "Noto Sans Myanmar", sans-serif;
  max-width: 60px;
  overflow-wrap: anywhere;
}
.voice-panel {
  flex-shrink: 0;
  max-height: min(64dvh, 570px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d9caef;
  background: #fcfaff;
  border-radius: 18px;
  padding: 15px;
  margin: 0 12px 8px;
  box-shadow: 0 3px 15px #5435830b;
  scroll-margin-bottom: 20px;
  color: #39254e;
}
.voice-panel header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.voice-panel .voice-stage {
  font-size: 14px;
  line-height: 1.65;
  flex: 1;
}
.voice-panel button {
  border: 1px solid #ddd0ed;
  border-radius: 11px;
  min-height: 44px;
  background: #fff;
  color: #6045a8;
  padding: 9px 12px;
  font: 13px/1.6 "Noto Sans Myanmar", sans-serif;
  cursor: pointer;
}
.voice-panel button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.voice-panel .voice-primary {
  background: #7152cb;
  border-color: #7152cb;
  color: #fff;
}
.voice-panel .voice-cancel {
  background: transparent;
  font-size: 12px;
  max-width: 120px;
  flex-shrink: 0;
}
.voice-panel p {
  font-size: 12px;
  line-height: 1.8;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.voice-demo,
.voice-sample-notice {
  border-radius: 10px;
  padding: 9px 11px;
  background: #f4ebcf;
  color: #705521;
}
.voice-panel .voice-scope {
  font-weight: 600;
  color: #73569c;
}
.voice-record-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
}
.voice-record-status time {
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}
.voice-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c2b2d7;
  flex-shrink: 0;
}
.voice-dot.active {
  background: #d44b6c;
}
.voice-record-status meter {
  flex: 1;
  height: 20px;
  accent-color: #7753c2;
  min-width: 0;
}
.voice-panel .voice-finish {
  width: 100%;
  font-weight: 700;
  font-size: 15px;
}
.voice-panel .voice-subtle {
  font-size: 10px;
  color: #85738f;
}
.voice-playback {
  border-top: 1px solid #e4d8ef;
  margin-top: 10px;
  padding-top: 10px;
}
.voice-playback label {
  font-size: 12px;
  display: block;
  line-height: 1.7;
}
.voice-playback audio {
  display: block;
  width: 100%;
  height: 38px;
  margin: 7px 0;
}
.voice-playback small {
  display: block;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.voice-review h3 {
  font-size: 15px;
  margin: 14px 0 7px;
}
.voice-text-label,
.voice-clarification label {
  display: block;
  font-size: 12px;
  line-height: 1.7;
}
.voice-panel textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7c8e6;
  background: #fff;
  border-radius: 11px;
  padding: 10px;
  font: 16px/1.75 "Noto Sans Myanmar", sans-serif;
  resize: vertical;
  min-height: 90px;
  max-height: 190px;
  scroll-margin: 16px;
  outline-color: #8a65d5;
}
.voice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  position: sticky;
  bottom: -15px;
  background: #fcfaff;
  padding: 12px 0 6px;
  z-index: 2;
}
.voice-merge {
  border: 1px solid #e3d6ef;
  border-radius: 10px;
  padding: 8px 11px;
  margin: 10px 0;
  font-size: 12px;
  line-height: 1.8;
}
.voice-merge label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
}
.voice-merge input {
  accent-color: #7654c5;
}
.voice-merge legend {
  padding: 0 4px;
}
.voice-clarification,
.voice-error {
  background: #fff3dd;
  border: 1px solid #efd2a4;
  border-radius: 11px;
  padding: 11px;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.8;
}
.voice-details {
  font-size: 11px;
  line-height: 1.8;
  padding: 7px 12px;
  color: #76618c;
  overflow-wrap: anywhere;
}
.voice-details summary {
  cursor: pointer;
  min-height: 32px;
}
.voice-details dl {
  margin: 8px 0;
}
.voice-details dt {
  font-weight: 700;
  margin-top: 8px;
}
.voice-details dd {
  margin: 2px 0 0;
  white-space: pre-wrap;
}
.voice-message-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.voice-message-group .voice-details {
  max-width: 88%;
  align-self: flex-end;
  background: #f6f1fd;
  border-radius: 12px;
  margin: 0 4px 8px;
}
.face-panel .voice-panel {
  margin: 6px 0;
  max-height: none;
  overflow: visible;
  flex-shrink: 0;
  padding: 12px;
}
.face-panel .voice-actions {
  position: static;
}
.face-panel:has(.voice-panel) {
  justify-content: flex-start;
}
.face-panel:has(.voice-panel) .face-output {
  flex-shrink: 0;
  min-height: 32px;
  font-size: 17px;
}
.face-panel .voice-trigger-language {
  font-size: 8px;
}
.voice-dev-toolbar {
  max-width: 950px;
  margin: 8px auto;
  background: #fff;
  border: 1px solid #e3d6f0;
  border-radius: 14px;
  padding: 10px 16px;
  box-sizing: border-box;
  color: #6b4c8e;
  font: 11px/1.7 "Noto Sans Myanmar", sans-serif;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.voice-dev-toolbar strong {
  color: #4c2d74;
  flex-basis: 100%;
  font-size: 12px;
}
.voice-dev-toolbar p {
  margin: 0;
  flex-basis: 100%;
}
.voice-dev-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.voice-dev-toolbar select,
.voice-dev-toolbar button {
  background: #fbf8fe;
  color: #5c4181;
  border: 1px solid #e0d2ed;
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
  min-height: 36px;
}
.voice-dev-toolbar button:disabled,
.voice-dev-toolbar select:disabled {
  opacity: 0.5;
}
.voice-test-storage-notice {
  padding: 6px 14px;
  color: #9b6527;
  font-size: 12px;
}
.voice-preview-shell.app-shell-chat {
  height: calc(var(--app-height, 100dvh) - 145px);
  min-height: 0;
}
.voice-preview-shell .device-shell {
  min-height: 0;
}
.voice-preview-shell .chat-screen {
  min-height: 0;
}
.voice-dev-toolbar + .voice-preview-shell .device-shell {
  margin-top: 0;
}
.voice-panel * {
  box-sizing: border-box;
}
.voice-panel [lang=my] {
  line-height: 1.9;
}
@media (max-width: 800px) {
  .voice-dev-toolbar {
    margin: 5px 8px;
    padding: 7px 10px;
    gap: 3px 8px;
  }
  .voice-dev-toolbar p {
    display: none;
  }
  .voice-dev-toolbar strong {
    font-size: 10px;
  }
  .voice-dev-toolbar label {
    font-size: 10px;
  }
  .voice-preview-shell.app-shell-chat {
    height: calc(var(--app-height, 100dvh) - 105px);
  }
  .voice-panel {
    margin: 0 8px 6px;
    max-height: 58dvh;
    padding: 12px;
  }
  .voice-actions {
    bottom: -12px;
  }
  .voice-preview-shell .device-shell {
    max-width: 480px;
  }
  .voice-panel header .voice-cancel {
    font-size: 11px;
    padding: 7px 8px;
  }
  .voice-panel .voice-stage {
    font-size: 13px;
  }
}
@media (max-width: 360px) {
  .voice-panel {
    padding: 10px;
  }
  .voice-panel header {
    gap: 4px;
  }
  .voice-actions button {
    font-size: 12px;
    padding: 8px;
  }
  .voice-panel .voice-cancel {
    max-width: 100px;
  }
  .voice-dev-toolbar {
    padding: 6px;
  }
  .voice-dev-toolbar strong {
    line-height: 1.6;
  }
}
body:has(.voice-preview-shell) {
  height: 100dvh;
  overflow: hidden;
}
.voice-preview-shell.app-shell-chat {
  height: calc(var(--app-height, 100dvh) - var(--voice-toolbar-height, 105px));
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
}
.voice-preview-shell.app-shell-chat .device-shell {
  height: 100%;
  max-height: 100%;
  box-sizing: border-box;
}
.voice-preview-shell.app-shell-chat .chat-screen {
  height: 100%;
  max-height: 100%;
}
