.tdv6{--tdv6-primary:#8b2f23;--ink:#2f2a25;--muted:#746d64;--line:#ded6ca;--paper:#fffdf8;--soft:#f6f0e7;width:100%;max-width:920px;padding:0 24px;margin:24px auto;color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;line-height:1.75}
.tdv6-skin-temple{--paper:#fffaf5;--soft:#f7eee6}
.tdv6-skin-buddhist{--paper:#fffef9;--soft:#f2f0e7}
.tdv6,.tdv6 *,.tdv6 *::before,.tdv6 *::after{box-sizing:border-box}
.tdv6 *{min-width:0;max-width:100%}
.tdv6-shell{width:100%;padding:0;margin-inline:auto}
.tdv6-has-bg .tdv6-shell{background-image:linear-gradient(rgba(255,253,248,.93),rgba(255,253,248,.93)),var(--tdv6-bg);background-size:cover;background-position:center;padding:20px;border-radius:24px}
.tdv6-head{text-align:center;margin-bottom:18px}
.tdv6-head h2{font-size:30px;margin:0 0 6px}
.tdv6-head p{margin:0;color:var(--muted)}
.tdv6-system-picker{display:flex;gap:12px;align-items:center;background:var(--soft);padding:12px 14px;border-radius:12px;margin-bottom:12px}
.tdv6-system-picker label{font-weight:700;white-space:nowrap}
.tdv6-system-picker select,.tdv6 input,.tdv6 textarea{width:100%;border:1px solid #cfc6b9;background:#fff;border-radius:10px;padding:11px 13px;font:inherit}
.tdv6-tabs{display:flex;gap:8px;margin-bottom:12px}
.tdv6-tabs button{flex:1;border:1px solid var(--line);background:#fff;border-radius:10px;padding:11px;cursor:pointer}
.tdv6-tabs button.is-active{background:var(--tdv6-primary);border-color:var(--tdv6-primary);color:#fff}
.tdv6-panel{display:none}
.tdv6-panel.is-active{display:block}
.tdv6-progress{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin-bottom:10px}
.tdv6-progress span{text-align:center;font-size:13px;padding:6px;border-bottom:2px solid #e6dfd4;color:#999087}
.tdv6-progress span.is-active{color:var(--tdv6-primary);border-color:var(--tdv6-primary);font-weight:700}
.tdv6-progress span.is-done{color:#575147;border-color:#aaa195}
.tdv6-card{width:100%;margin-inline:auto;text-align:center;background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:24px;box-shadow:0 10px 30px rgba(40,35,30,.06)}
.tdv6-card h3{margin-top:0}
.tdv6 textarea{resize:vertical;margin-bottom:12px}
.tdv6-primary,.tdv6-secondary{border:0;border-radius:10px;padding:11px 16px;font-weight:700;cursor:pointer}
.tdv6-primary{background:var(--tdv6-primary);color:#fff}
.tdv6-secondary{background:var(--soft);color:var(--ink)}
.tdv6-primary:disabled{opacity:.55}
.tdv6-inline{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px;width:100%;max-width:620px;margin-inline:auto}
.tdv6-inline input{flex:1 1 240px;width:auto}
.tdv6-inline button{flex:0 1 auto}
.tdv6-note{margin-top:12px;background:var(--soft);padding:12px 14px;border-radius:12px;font-size:14px}
.tdv6-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important}
.tdv6-jiaobei{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:14px;margin-bottom:10px;background:#fff}
.tdv6-jiaobei img{display:block;width:260px;max-width:100%;height:auto;margin-inline:auto}
.tdv6-jiaobei span{display:block;color:var(--muted);font-size:13px}
.tdv6-jiaobei strong{display:block;font-size:24px;color:var(--tdv6-primary)}
.tdv6-status{font-size:17px}
.tdv6-status.is-success{font-weight:700;color:var(--tdv6-primary)}
.tdv6-counter{background:var(--soft);padding:12px;border-radius:10px;margin:10px 0}
.tdv6-kicker{font-size:13px;color:var(--muted);letter-spacing:.05em}
.tdv6-lot{border-top:1px solid var(--line);margin-top:18px;padding-top:20px}
.tdv6-lot h3{font-size:24px;margin:4px 0 8px}
.tdv6-meta{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;font-size:14px;color:#625b53}
.tdv6-poem{font-family:"Noto Serif TC","PMingLiU",serif;font-size:22px;line-height:2;text-align:center;background:var(--soft);padding:18px;border-radius:14px;width:100%;max-width:620px;margin:16px auto}
.tdv6-explain h4,.tdv6-save h4{color:var(--tdv6-primary)}
.tdv6-save{border-top:1px solid var(--line);margin-top:20px;padding-top:16px}
.tdv6-codebox{display:flex;justify-content:center;gap:8px;align-items:center;flex-wrap:wrap}
.tdv6-codebox code{padding:8px;background:var(--soft);border-radius:8px}
.tdv6-qr{display:block;width:180px;height:auto;aspect-ratio:1;margin:14px auto;background:#fff;border:1px solid var(--line)}
.tdv6 [hidden]{display:none!important}
@media(max-width:640px){.tdv6{margin:12px auto;padding:0 16px}
.tdv6-has-bg .tdv6-shell{padding:16px}
.tdv6-card{padding:18px}
.tdv6-head h2{font-size:25px}
.tdv6-tabs button{font-size:14px;padding:9px 5px}
.tdv6-inline{flex-direction:column}
.tdv6-inline input{flex:0 1 auto;width:100%}
.tdv6-system-picker{align-items:flex-start;flex-direction:column}
.tdv6-jiaobei{flex-direction:column;align-items:center}
.tdv6-jiaobei img{max-width:100%;width:260px}
.tdv6-poem{font-size:20px}
}


/* v6.0.1: shared containment and reading widths for every flow and lookup result. */
.tdv6 { overflow-wrap:anywhere; word-break:normal; }

.tdv6 .tdv6-panel { width:100%; margin-inline:auto; }

.tdv6 .tdv6-tabs { justify-content:center; flex-wrap:wrap; }

.tdv6 .tdv6-tabs button { flex:1 1 120px; }

.tdv6 .tdv6-system-picker { justify-content:center; }

.tdv6 .tdv6-system-picker select { min-width:0; }

.tdv6 button,.tdv6 code,.tdv6 p,.tdv6 h2,.tdv6 h3,.tdv6 h4,.tdv6 .tdv6-poem {
  white-space:normal; overflow-wrap:anywhere; word-break:normal;
}

.tdv6 button { float:none; text-align:center; }

.tdv6 #tdv6-online-content { width:100%; text-align:center; }

.tdv6 #tdv6-intent { display:block; width:100%; max-width:620px; margin-inline:auto; text-align:start; }

.tdv6 #tdv6-online-result,.tdv6 #tdv6-lookup-result,.tdv6 #tdv6-code-result { width:100%; }

.tdv6 .tdv6-lot { width:100%; text-align:center; }

.tdv6 .tdv6-lot > section { width:100%; max-width:42rem; margin-inline:auto; text-align:start; line-height:1.9; }

.tdv6 .tdv6-lot > section p { width:auto; margin-inline:0; }

.tdv6 img,.tdv6 svg,.tdv6 canvas { display:block; max-width:100%; height:auto; margin-inline:auto; }

.tdv6 .tdv6-status,.tdv6 .tdv6-counter { max-width:620px; margin-inline:auto; }


/* Waiting for the first throw: show the complete supplied artwork. */
.tdv6 .tdv6-asking-image, .tdv6 .tdv6-lookup-image { width:100%; max-width:420px; height:auto; margin:0 auto 20px; border-radius:12px; }

/* v6.0.4: centered header group with artwork left and copy right. */
.tdv6 .tdv6-head { display:flex; flex-direction:row; justify-content:center; align-items:center; gap:24px; text-align:start; }
.tdv6 .tdv6-header-image { flex:0 0 auto; width:110px; max-width:28%; height:auto; margin:0; }
.tdv6 .tdv6-head-copy { flex:0 1 480px; min-width:0; }
.tdv6 .tdv6-head-copy h2,.tdv6 .tdv6-head-copy p { text-align:start; }
@media(max-width:640px) {
  .tdv6 .tdv6-head { gap:14px; }
  .tdv6 .tdv6-header-image { width:72px; }
  .tdv6 .tdv6-head-copy { flex:1 1 0; }
  .tdv6 .tdv6-head-copy h2 { font-size:24px; }
  .tdv6 .tdv6-head-copy p { font-size:14px; }
}

/* v6.0.6: respectful notice, separate from operational rules. */
.tdv6 .tdv6-respect-notice { width:100%; max-width:100%; margin:16px auto 0; padding:16px 18px; border:1px solid var(--line); border-radius:12px; background:var(--soft); color:var(--ink); text-align:start; font-size:15px; font-weight:700; line-height:1.9; overflow-wrap:anywhere; }
.tdv6 .tdv6-respect-notice strong { display:block; font-weight:700; color:var(--tdv6-primary); }
.tdv6 .tdv6-respect-notice p { margin:6px 0 0; font-weight:700; }

/* v6.0.7: artwork for the ready-to-draw step. */
.tdv6 .tdv6-draw-image { display:block; width:320px; max-width:100%; height:auto; margin:0 auto 20px; }
@media(max-width:640px) { .tdv6 .tdv6-draw-image { width:240px; margin-bottom:16px; } }

/* Horizontal verification artwork: preserve the full intrinsic aspect ratio. */
.tdv6 .tdv6-verify-image { display:block; width:420px; max-width:100%; height:auto; margin:0 auto 20px; }

/* v6.0.10: keep rule copy wrapping even when a theme styles notices as nowrap. */
.tdv6 .tdv6-note { display:block; width:100%; min-width:0; max-width:100%; height:auto; text-align:start; }
.tdv6 .tdv6-note, .tdv6 .tdv6-note > strong, .tdv6 .tdv6-note > .tdv6-rule-text {
  white-space:normal !important; overflow-wrap:anywhere !important; word-break:normal;
}
.tdv6 .tdv6-note > strong { display:block; float:none; max-width:100%; }
.tdv6 .tdv6-note > .tdv6-rule-text { display:block; float:none; width:auto; min-width:0; max-width:100%; height:auto; margin:6px 0 0; padding:0; line-height:1.9; }

/* v6.0.11: matching rule and respect-notice frames. */
.tdv6 .tdv6-note { border:1px solid var(--line); border-radius:12px; padding:16px 18px; }
.tdv6 { white-space:normal; }
