@import url("../../css/common/tutorial-colors.css?v=20261127TutorialStandard1");

.smg-dialog { --smg-green: #157347; --smg-line: #d9e7de; --smg-ui-scale: 1; position: fixed; inset: 0; display: none; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: #f4faf6; color: #203a2d; font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
.smg-dialog[open] { display: flex; flex-direction: column; }
.smg-dialog::backdrop { background: #152c2459; }
.smg-dialog *, .smg-dialog *::before, .smg-dialog *::after { box-sizing: border-box; }
.smg-dialog [hidden] { display: none !important; }
.smg-content { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.smg-dialog button { font: inherit; cursor: pointer; }
.smg-dialog button:focus-visible, .smg-dialog input:focus-visible { outline: 3px solid #6bbf91; outline-offset: 2px; }
.smg-header { display: flex; align-items: center; justify-content: space-between; flex: none; min-height: 62px; gap: 12px; padding: 12px max(18px, env(safe-area-inset-left)) 12px max(18px, env(safe-area-inset-right)); border-bottom: 1px solid var(--smg-line); background: #edf8f1; }
.smg-header h2 { margin: 0; color: var(--smg-green); font-size: calc(clamp(18px, 3.6vw, 25px) * var(--smg-ui-scale)); line-height: 1.25; }
.smg-layout { display: grid; grid-template-columns: minmax(154px, 23vw) minmax(0, 1fr); flex: 1; min-height: 0; }
.smg-sidebar { min-width: 0; padding: calc(14px * var(--smg-ui-scale)) calc(10px * var(--smg-ui-scale)); overflow-y: auto; border-right: 1px solid var(--smg-line); background: #f6faf7; }
.smg-sidebar > p { margin: 0 calc(6px * var(--smg-ui-scale)) calc(8px * var(--smg-ui-scale)); color: #63746b; font-size: calc(11px * var(--smg-ui-scale)); }
.smg-sidebar nav { display: grid; gap: calc(4px * var(--smg-ui-scale)); }
.smg-sidebar nav button { display: flex; align-items: center; gap: calc(8px * var(--smg-ui-scale)); width: 100%; padding: calc(8px * var(--smg-ui-scale)) calc(7px * var(--smg-ui-scale)); border: 1px solid transparent; border-radius: calc(8px * var(--smg-ui-scale)); background: transparent; color: #45604f; text-align: left; }
.smg-sidebar nav strong { display: block; overflow: hidden; font-size: calc(12px * var(--smg-ui-scale)); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.smg-sidebar nav small { display: block; overflow: hidden; margin-top: calc(1px * var(--smg-ui-scale)); color: #63746b; font-size: calc(10px * var(--smg-ui-scale)); text-overflow: ellipsis; white-space: nowrap; }
.smg-sidebar nav button[aria-current="true"] { border-color: #c9e1d1; background: #e5f2e9; color: #125f3a; box-shadow: inset 3px 0 0 #238454; }
.smg-dictionary { margin: calc(14px * var(--smg-ui-scale)) calc(4px * var(--smg-ui-scale)) 0; padding-top: calc(10px * var(--smg-ui-scale)); border-top: 1px solid var(--smg-line); }
.smg-dictionary > summary { color: var(--smg-green); font-size: calc(12px * var(--smg-ui-scale)); font-weight: 600; cursor: pointer; }
.smg-search { display: grid; gap: calc(4px * var(--smg-ui-scale)); margin: calc(8px * var(--smg-ui-scale)) 0; color: #63746b; font-size: calc(10px * var(--smg-ui-scale)); }
.smg-search input { width: 100%; min-height: calc(30px * var(--smg-ui-scale)); padding: calc(5px * var(--smg-ui-scale)) calc(7px * var(--smg-ui-scale)); border: 1px solid var(--smg-line); border-radius: calc(6px * var(--smg-ui-scale)); color: #203a2d; font: inherit; font-size: calc(11px * var(--smg-ui-scale)); }
.smg-term-list { display: grid; gap: calc(3px * var(--smg-ui-scale)); }
.smg-term-list > button { padding: calc(5px * var(--smg-ui-scale)) calc(6px * var(--smg-ui-scale)); border: 1px solid transparent; border-radius: calc(5px * var(--smg-ui-scale)); background: transparent; color: #45604f; font-size: calc(11px * var(--smg-ui-scale)); text-align: left; }
.smg-term-list > button[aria-pressed="true"] { border-color: #b8d9c4; background: #e5f2e9; color: #125f3a; }
.smg-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: calc(12px * var(--smg-ui-scale)) calc(14px * var(--smg-ui-scale)) calc(10px * var(--smg-ui-scale)); overflow: auto; }
.smg-stage-bar { display: flex; justify-content: space-between; align-items: center; flex: none; gap: calc(10px * var(--smg-ui-scale)); margin-bottom: calc(7px * var(--smg-ui-scale)); font-size: calc(11px * var(--smg-ui-scale)); font-weight: 600; }
.smg-stage-bar > small { color: #63746b; font-size: calc(10px * var(--smg-ui-scale)); font-weight: 400; }
.smg-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; border: 1px solid #dce4ee; border-radius: calc(11px * var(--smg-ui-scale)); background: #f6f8fc; isolation: isolate; }
.smg-explanation { display: grid; flex: none; gap: calc(2px * var(--smg-ui-scale)); min-height: calc(74px * var(--smg-ui-scale)); padding: calc(8px * var(--smg-ui-scale)) 1px 0; }
.smg-caption-label { color: var(--smg-green); font-size: calc(10px * var(--smg-ui-scale)); }
.smg-explanation > strong { font-size: calc(15px * var(--smg-ui-scale)); font-weight: 600; }
.smg-explanation p { margin: 0; color: #375244; font-size: calc(11px * var(--smg-ui-scale)); line-height: 1.45; }
.smg-explanation .smg-value { color: #63746b; font-size: calc(10px * var(--smg-ui-scale)); }
.smg-explanation > small { color: #79877e; font-size: calc(10px * var(--smg-ui-scale)); }
.smg-explanation > small:empty { display: none; }
.smg-footer { flex: none; padding: 0 max(calc(14px * var(--smg-ui-scale)), env(safe-area-inset-right)) calc(8px * var(--smg-ui-scale)) max(calc(14px * var(--smg-ui-scale)), env(safe-area-inset-left)); border-top: 1px solid var(--smg-line); background: #fbfdfb; }
.smg-progress { height: calc(3px * var(--smg-ui-scale)); margin: 0 calc(-14px * var(--smg-ui-scale)) calc(8px * var(--smg-ui-scale)); overflow: hidden; background: #e5eee8; }
.smg-progress > i { display: block; width: 100%; height: 100%; background: var(--smg-green); transform: scaleX(0); transform-origin: left; }
.smg-footer-row { display: flex; align-items: center; justify-content: space-between; gap: calc(8px * var(--smg-ui-scale)); }
.smg-footer-row > div:first-child > span { display: block; color: #41614e; font-size: calc(10px * var(--smg-ui-scale)); }
.smg-footer-row small { display: block; margin-top: calc(2px * var(--smg-ui-scale)); color: #63746b; font-size: calc(9px * var(--smg-ui-scale)); }
.smg-playback { display: flex; flex: none; gap: calc(5px * var(--smg-ui-scale)); }
.smg-playback > button { min-height: calc(32px * var(--smg-ui-scale)); padding: calc(5px * var(--smg-ui-scale)) calc(8px * var(--smg-ui-scale)); border: 1px solid var(--smg-line); border-radius: calc(7px * var(--smg-ui-scale)); background: white; color: #375244; font-size: calc(11px * var(--smg-ui-scale)); }
.smg-playback > .smg-play { min-width: calc(65px * var(--smg-ui-scale)); border-color: var(--smg-green); background: var(--smg-green); color: white; }
.smg-orientation { display: grid; place-items: center; flex: 1; padding: 24px; background: radial-gradient(circle at 50% 40%, #ffffff 0, #eff9f2 58%, #e4f2e9 100%); text-align: center; }
.smg-orientation-card { display: grid; justify-items: center; gap: 12px; width: min(440px, 88vw); padding: 28px 22px; border: 1px solid #c9e1d1; border-radius: 18px; background: #ffffffd9; box-shadow: 0 18px 55px #183d291f; }
.smg-orientation-icon { display: grid; place-items: center; width: 72px; height: 52px; border: 3px solid #238454; border-radius: 9px; color: #238454; font-size: 26px; animation: smg-rotate-device 2.4s ease-in-out infinite; }
.smg-orientation-card h3 { margin: 0; color: #125f3a; font-size: 20px; }
.smg-orientation-card p { margin: 0; color: #45604f; font-size: 13px; }
.smg-orientation-card small { color: #63746b; font-size: 11px; }
@keyframes smg-rotate-device { 0%, 35% { transform: rotate(0); } 55%, 80% { transform: rotate(90deg); } 100% { transform: rotate(90deg); } }
.smg-chat { display: flex; flex-direction: column; height: 100%; color: #24344b; font-size: calc(12px * var(--smg-ui-scale)); }
.smg-chat-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: calc(7px * var(--smg-ui-scale)); flex: none; min-height: calc(48px * var(--smg-ui-scale)); padding: calc(7px * var(--smg-ui-scale)) calc(10px * var(--smg-ui-scale)); border-bottom: 1px solid #dce4ee; background: #f7f9fd; }
.smg-chat-top > strong { color: #24344b; font-size: calc(14px * var(--smg-ui-scale)); text-align: center; }
.smg-chat-top-left, .smg-chat-top-right { display: flex; align-items: center; gap: calc(5px * var(--smg-ui-scale)); min-width: 0; }
.smg-chat-top-right { justify-content: flex-end; }
.smg-chat .scg-control { min-height: calc(28px * var(--smg-ui-scale)); padding: calc(5px * var(--smg-ui-scale)) calc(7px * var(--smg-ui-scale)); border-radius: calc(7px * var(--smg-ui-scale)); }
.smg-chat .scg-icon-surface { width: calc(36px * var(--smg-ui-scale)) !important; height: calc(36px * var(--smg-ui-scale)) !important; }
.smg-chat .scg-icon-surface > i { font-size: calc(22px * var(--smg-ui-scale)) !important; }
.smg-chat .scg-icon-surface > svg { width: calc(22px * var(--smg-ui-scale)) !important; height: calc(22px * var(--smg-ui-scale)) !important; }
.smg-action-row .scg-control, .smg-entry-row .scg-control { font-size: calc(11px * var(--smg-ui-scale)); }
.smg-chat-top [data-scg-term="menu"] { width: calc(34px * var(--smg-ui-scale)); height: calc(34px * var(--smg-ui-scale)); padding: 0 !important; }
.smg-chat-top [data-scg-term="menu"] > span, .smg-chat-top [data-scg-term="new"] > span { display: none; }
.smg-chat-top [data-scg-term="strategy"] > span { display: none; }
.smg-chat-top [data-scg-term="profile"] { min-width: calc(34px * var(--smg-ui-scale)); height: calc(34px * var(--smg-ui-scale)); padding: 0 calc(7px * var(--smg-ui-scale)) !important; border-radius: calc(17px * var(--smg-ui-scale)) !important; }
.smg-chat-top [data-scg-term="profile"] > span { display: inline; max-width: calc(110px * var(--smg-ui-scale)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smg-chat-top [data-scg-term="tasks"] { width: calc(34px * var(--smg-ui-scale)); height: calc(34px * var(--smg-ui-scale)); padding: 0 !important; }
.smg-chat-top [data-scg-term="tasks"] > span { display: none; }
.smg-chat-body { position: relative; display: flex; flex-direction: column; flex: 1; gap: calc(8px * var(--smg-ui-scale)); min-height: 0; padding: calc(9px * var(--smg-ui-scale)); overflow: auto; }
.smg-conversation { display: flex; flex-direction: column; flex: 1 0 auto; gap: calc(8px * var(--smg-ui-scale)); min-height: calc(54px * var(--smg-ui-scale)); }
.smg-welcome { display: grid; justify-items: center; align-content: center; flex: 1; min-height: calc(80px * var(--smg-ui-scale)); padding: calc(10px * var(--smg-ui-scale)); color: #71829a; text-align: center; }
.smg-welcome h3 { margin: calc(7px * var(--smg-ui-scale)) 0 calc(3px * var(--smg-ui-scale)); color: #324c70; font-size: calc(15px * var(--smg-ui-scale)); font-weight: 500; }
.smg-welcome p { margin: 0; font-size: calc(10px * var(--smg-ui-scale)); }
.smg-message { align-self: flex-start; max-width: 86%; padding: calc(8px * var(--smg-ui-scale)) calc(10px * var(--smg-ui-scale)); border: 1px solid #e0e6ef; border-radius: calc(9px * var(--smg-ui-scale)) calc(9px * var(--smg-ui-scale)) calc(9px * var(--smg-ui-scale)) 3px; background: #fff; box-shadow: 0 2px 7px #2b477105; }
.smg-message > small { color: #7385a0; font-size: calc(9px * var(--smg-ui-scale)); }
.smg-message > p { margin: calc(3px * var(--smg-ui-scale)) 0 0; font-size: calc(11px * var(--smg-ui-scale)); line-height: 1.5; }
.smg-composer { display: grid; flex: none; gap: calc(6px * var(--smg-ui-scale)); margin-top: auto; }
.smg-action-row, .smg-tool-row, .smg-entry-row { display: flex; align-items: center; flex-wrap: wrap; gap: calc(7px * var(--smg-ui-scale)); }
.smg-action-row { justify-content: center; min-height: calc(34px * var(--smg-ui-scale)); padding: calc(2px * var(--smg-ui-scale)) 0; }
.smg-entry-row { padding-top: calc(3px * var(--smg-ui-scale)); }
.smg-input-row { display: flex; align-items: flex-end; gap: calc(6px * var(--smg-ui-scale)); }
.smg-input-placeholder { flex: 1; min-width: 0; min-height: calc(43px * var(--smg-ui-scale)); padding: calc(8px * var(--smg-ui-scale)) calc(10px * var(--smg-ui-scale)); border: 1px solid #c8d7e9; border-radius: calc(8px * var(--smg-ui-scale)); background: #fff; color: #586e8a; font-size: calc(11px * var(--smg-ui-scale)); line-height: 1.5; }
.smg-answer-actions, .smg-fold-more { display: flex; align-items: center; flex-wrap: wrap; gap: calc(5px * var(--smg-ui-scale)); }
.smg-fold-more[hidden] { display: none; }
.smg-answer-actions .scg-control { min-width: calc(52px * var(--smg-ui-scale)); min-height: calc(42px * var(--smg-ui-scale)); padding: calc(5px * var(--smg-ui-scale)); border: 0; background: transparent; color: #6b7280; font-size: calc(11px * var(--smg-ui-scale)); box-shadow: none; }
.smg-answer-actions .scg-control > i { font-size: calc(15px * var(--smg-ui-scale)); }
.smg-answer-actions [data-scg-term="transfer"] { width: calc(40px * var(--smg-ui-scale)); min-width: calc(40px * var(--smg-ui-scale)); }
.smg-answer-actions [data-scg-term="transfer"] > span { display: none; }
.smg-resource-title { color: #304b70; font-size: calc(15px * var(--smg-ui-scale)); font-weight: 600; }
.smg-resource-title > small { margin-left: calc(6px * var(--smg-ui-scale)); color: #7c8aa0; font-size: calc(9px * var(--smg-ui-scale)); font-weight: 400; }
.smg-resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(9px * var(--smg-ui-scale)); }
.smg-resource-grid > .scg-resource-card { display: grid; justify-items: start; align-content: start; min-width: 0; min-height: calc(80px * var(--smg-ui-scale)); gap: calc(4px * var(--smg-ui-scale)); padding: calc(10px * var(--smg-ui-scale)); text-align: left; overflow-wrap: anywhere; }
.smg-resource-grid strong { font-size: calc(13px * var(--smg-ui-scale)); font-weight: 600; }
.smg-resource-grid small { color: #7c8aa0; font-size: calc(11px * var(--smg-ui-scale)); line-height: 1.5; }
.smg-profile { display: grid; grid-template-columns: calc(180px * var(--smg-ui-scale)) minmax(0, 1fr); align-items: center; flex: 1; gap: calc(18px * var(--smg-ui-scale)); min-height: 0; }
.smg-profile-summary { display: grid; justify-items: center; gap: calc(5px * var(--smg-ui-scale)); color: #73839a; text-align: center; }
.smg-profile-summary > strong { color: #304b70; font-size: calc(14px * var(--smg-ui-scale)); }
.smg-profile-summary > small { font-size: calc(9px * var(--smg-ui-scale)); }
.smg-avatar { display: grid; place-items: center; width: calc(46px * var(--smg-ui-scale)); height: calc(46px * var(--smg-ui-scale)); border-radius: 50%; background: #e2edfb; color: #4e75ad; font-size: calc(20px * var(--smg-ui-scale)); }
.smg-profile-menu { padding: calc(8px * var(--smg-ui-scale)); border: 1px solid #dce4ef; border-radius: calc(9px * var(--smg-ui-scale)); background: #fff; }
.smg-profile-menu .scg-controls { display: grid; gap: calc(2px * var(--smg-ui-scale)); }
.smg-profile-menu .scg-control { justify-content: flex-start; width: 100%; min-height: calc(28px * var(--smg-ui-scale)); padding: calc(4px * var(--smg-ui-scale)) calc(6px * var(--smg-ui-scale)); font-size: calc(10px * var(--smg-ui-scale)); }
.smg-guide-row { margin-top: calc(4px * var(--smg-ui-scale)); padding: calc(7px * var(--smg-ui-scale)) calc(6px * var(--smg-ui-scale)); border-top: 1px solid #e6ebf2; color: #267747; font-size: calc(11px * var(--smg-ui-scale)); }
.smg-focus-ring { transition: opacity .12s ease; position: absolute; z-index: 3; border: 2px solid #dc2626; border-radius: 8px; opacity: 0; pointer-events: none; }
/* Larger landscape tablets get a measured step-up instead of inheriting desktop-sized controls. */
@media (min-width: 1100px) and (min-height: 600px) {
  .smg-dialog { --smg-ui-scale: 1.08; }
}
@media (min-width: 2000px) and (min-height: 1100px) {
  .smg-dialog { --smg-ui-scale: 1.16; }
}
@media (max-height: 420px) { .smg-header { min-height: 50px; padding-block: 7px; } .smg-sidebar { padding-block: 9px; } .smg-main { padding-block: 8px; } .smg-explanation { min-height: 62px; padding-top: 5px; } .smg-footer { padding-bottom: 5px; } }

/* DEVICE_PREVIEW_ACCURACY_V2: The stage follows the actual index.html
   structures instead of shrinking one generic phone mock-up. */
#subjectChatMobileGuide {
  --smg-font: "Guide Hei", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-family: var(--smg-font);
  color: #111827;
}
#subjectChatMobileGuide .smg-header,
#subjectChatMobileGuide .smg-sidebar,
#subjectChatMobileGuide .smg-main,
#subjectChatMobileGuide .smg-footer,
#subjectChatMobileGuide .smg-chat,
#subjectChatMobileGuide .smg-chat button,
#subjectChatMobileGuide .smg-chat input { font-family: var(--smg-font); }
#subjectChatMobileGuide .smg-chat { position: relative; height: 100%; min-height: 0; overflow: hidden; background: #f7f9fc; }

/* Keep the profile avatar surface visible. The generic icon-only rule must
   hide only the copied text label; desktop keeps the real name-grade label. */

/* Shared chapter chrome surrounds a proportional, isolated copy of index.html.
   Never restyle the inner controls here: the real tablet CSS owns their UI. */
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) { --smg-ui-scale: 1; --smg-green: var(--guide-green); --smg-line: var(--guide-line); background: var(--guide-green-soft); font-size: clamp(17px, 1.1vw, 21px); color: var(--guide-ink); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-header { min-height: 68px; padding: 12px 24px; background: var(--guide-green-soft); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-header h2 { color: var(--guide-green-dark); font-size: clamp(21px, 1.55vw, 30px); font-weight: 750; }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-layout { grid-template-columns: clamp(240px, 17vw, 330px) minmax(0, 1fr); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-sidebar { padding: 18px 14px; background: var(--guide-directory); border-right-color: var(--guide-directory-border); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-sidebar > p { font-size: 15px; color: var(--guide-directory-muted); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-sidebar nav button { min-height: 70px; padding: 12px; gap: 12px; border-color: var(--guide-directory-border); background: var(--guide-directory-item); color: var(--guide-directory-text); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-sidebar nav strong { font-size: clamp(17px, 1vw, 21px); font-weight: 700; }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-sidebar nav small { margin-top: 5px; font-size: clamp(14px, .8vw, 17px); color: var(--guide-directory-muted); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-sidebar nav button[aria-current="true"] { border-color: var(--guide-directory-focus); background: var(--guide-directory-active); color: var(--guide-directory-text); box-shadow: inset 4px 0 var(--guide-directory-accent); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-dictionary > summary,
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-term-list > button,
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-search,
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-search input { font-size: 16px; }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-search input,
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-term-list > button { min-height: 44px; }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-main { padding: 16px 24px 12px; overflow: auto; }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-stage-bar { min-height: 34px; gap: 10px; font-size: 16px; color: var(--guide-green-dark); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-stage-bar > small { margin-left: auto; font-size: 14px; color: var(--guide-muted); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) [data-smg-action="expand"] { flex: none; min-height: 36px; padding: 5px 12px; border: 1px solid var(--guide-line); border-radius: 9px; background: #fff; color: var(--guide-green-dark); font-size: 16px; font-weight: 650; }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-stage { min-height: 0; border-radius: 14px; background: #f6faf7; }
.smg-live-preview { position: absolute; margin: 0; border: 0; background: #f7f8fa; transform-origin: top left; }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-explanation { min-height: 100px; gap: 6px; padding-top: 12px; }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-caption-label { font-size: 14px; color: var(--guide-green); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-explanation > strong { color: var(--guide-green-dark); font-size: clamp(19px, 1.2vw, 25px); font-weight: 750; }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-explanation p { font-size: clamp(16px, 1vw, 21px); color: var(--guide-ink); line-height: 1.6; }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-explanation .smg-value,
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-explanation > small { font-size: 15px; color: var(--guide-muted); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-footer { --smg-footer-inset: 20px; padding: 0 20px 10px; background: #fff; }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-footer-row > div:first-child > span { font-size: 16px; color: var(--guide-ink); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-footer-row small { font-size: 14px; color: var(--guide-muted); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-playback > button { min-height: 44px; padding: 7px 15px; font-size: 17px; color: var(--guide-green-dark); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-playback > .smg-play { background: var(--guide-green); color: #fff; }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-dictionary { border-top-color: var(--guide-directory-border); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-dictionary > summary { color: var(--guide-directory-accent); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-search { color: var(--guide-directory-muted); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-term-list > button { color: var(--guide-directory-text); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-term-list > button[aria-pressed="true"] { border-color: var(--guide-directory-focus); background: var(--guide-directory-active); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-playback > button:hover:not(:disabled),
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) [data-smg-action="expand"]:hover { border-color: var(--guide-green); }
#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-playback > .smg-play:hover { background: var(--guide-green-dark); }
@media (max-height: 500px) and (orientation: landscape) {
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-header { min-height: 46px; padding: 4px 12px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-header h2 { font-size: 18px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-layout { grid-template-columns: 174px minmax(0, 1fr); }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-sidebar { padding: 8px 6px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-sidebar > p,
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-sidebar nav small,
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-stage-bar > small,
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-caption-label,
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-footer-row small { display: none; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-sidebar nav button { min-height: 44px; padding: 7px 6px; gap: 7px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-sidebar nav strong { font-size: 15px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-dictionary { margin-top: 6px; padding-top: 6px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-main { padding: 4px 8px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-stage-bar { min-height: 28px; margin-bottom: 4px; font-size: 14px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) [data-smg-action="expand"] { min-height: 44px; padding: 2px 8px; font-size: 14px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-explanation { min-height: 62px; padding-top: 5px; gap: 2px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-explanation > strong { font-size: 17px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-explanation p { font-size: 15px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-explanation .smg-value { font-size: 14px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-footer { --smg-footer-inset: 10px; padding: 0 10px 5px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-progress { margin-bottom: 4px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-footer-row > div:first-child > span { font-size: 14px; }
  #subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-playback > button { min-height: 44px; padding: 4px 9px; font-size: 15px; }
  }

@media (prefers-reduced-motion: reduce) { .smg-focus-ring { transition: none; } }

/* Guide text is independent of the native UI inside the preview. */
@font-face { font-family: "Guide Hei"; src: url("../../assets/fonts/guide-hei/noto-sans-sc-guide-c5f201ec5c.woff2") format("woff2"); font-style: normal; font-weight: 100 900; font-display: swap; }
.smg-entry-status { position: fixed; z-index: 2147483000; left: 50%; top: 20px; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; max-width: calc(100vw - 32px); padding: 14px 20px; border: 1px solid #b8d9c4; border-radius: 12px; background: #fff; color: #14532d; box-shadow: 0 8px 30px #183d2926; font: 16px/1.5 "PingFang SC", "Microsoft YaHei", sans-serif; }
.smg-entry-status button, .smg-preview-status button { min-height: 44px; padding: 7px 15px; border: 1px solid #b8d9c4; border-radius: 8px; background: #fff; color: #14532d; font: inherit; cursor: pointer; }
.smg-preview-status { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; background: #f6faf7; color: #14532d; text-align: center; font-size: 17px; }
.smg-preview-status p { margin: 0; }
.smg-dialog [data-preview-state="loading"] .smg-live-preview, .smg-dialog [data-preview-state="error"] .smg-live-preview { visibility: hidden; }
#subjectChatMobileGuide .smg-playback > button, #subjectChatMobileGuide [data-smg-action="expand"] { min-height: 44px; }
#subjectChatMobileGuide .smg-sidebar nav strong, #subjectChatMobileGuide .smg-sidebar nav small { white-space: normal; overflow-wrap: anywhere; }
#subjectChatMobileGuide [data-smg-audience]:focus { outline: none; }
#subjectChatMobileGuide button:disabled { cursor: default; opacity: .55; }
@media (max-width: 1100px) {
  #subjectChatMobileGuide[data-device-profile="desktop"] .smg-layout { grid-template-columns: 200px minmax(0, 1fr); }
  #subjectChatMobileGuide[data-device-profile="desktop"] .smg-main { padding: 12px; }
  #subjectChatMobileGuide[data-device-profile="desktop"] .smg-header { min-height: 60px; padding: 10px 18px; }
  #subjectChatMobileGuide[data-device-profile="desktop"] .smg-header h2 { font-size: 22px; }
}
@media (max-width: 650px) {
  #subjectChatMobileGuide[data-device-profile="desktop"] .smg-layout { grid-template-columns: minmax(0, 1fr); overflow: auto; }
  #subjectChatMobileGuide[data-device-profile="desktop"] .smg-sidebar { max-height: 180px; padding: 8px 12px; border-bottom: 1px solid var(--smg-line); }
  #subjectChatMobileGuide[data-device-profile="desktop"] .smg-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #subjectChatMobileGuide[data-device-profile="desktop"] .smg-sidebar nav button { min-height: 44px; padding: 6px; }
  #subjectChatMobileGuide[data-device-profile="desktop"] .smg-sidebar nav small { display: none; }
  #subjectChatMobileGuide[data-device-profile="desktop"] .smg-main { min-height: 380px; }
  #subjectChatMobileGuide .smg-footer-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  #subjectChatMobileGuide *, #subjectChatMobileGuide *::before, #subjectChatMobileGuide *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

#subjectChatMobileGuide .smg-stage { overflow: clip; }

#subjectChatMobileGuide:is([data-device-profile="tablet"], [data-device-profile="desktop"]) .smg-progress { margin-inline: calc(-1 * var(--smg-footer-inset)); }
