.takehome-dialog { box-sizing: border-box; position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: calc(100% - 24px); max-width: 640px; height: calc(100% - 24px); max-height: 900px; padding: 0; margin: auto; border: 1px solid #dac4a9; border-radius: 24px; color: #664934; background: #fffaf2; overflow: hidden; z-index: 10000; box-shadow: 0 18px 70px rgba(71,45,22,.22); }
.takehome-dialog:not([open]) { display: none; }
.takehome-dialog::backdrop { background: rgba(65,45,29,.38); }
.takehome-dialog *, .takehome-dialog *::before, .takehome-dialog *::after { box-sizing: border-box; }
.takehome-dialog [hidden] { display: none !important; }
.takehome-shell { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.takehome-header { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 14px; border-bottom: 1px solid #ebddc9; background: #fffaf2; }
.takehome-header h2 { font-size: 24px; margin: 4px 0 0; line-height: 1.25; }
.takehome-eyebrow { font-size: 12px; color: #92765e; }
.takehome-close { flex: 0 0 auto; margin-left: 12px; min-width: 56px; min-height: 44px; border: 1px solid #d6bda0; border-radius: 20px; background: #fff; color: #765338; font: inherit; font-size: 14px; }
.takehome-scroll { min-height: 0; flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 20px 10px; }
.takehome-kinds { display: flex; }
.takehome-kinds > * { flex: 1 1 0; min-width: 0; }
.takehome-kinds > * + * { margin-left: 7px; }
.takehome-choice { min-height: 44px; padding: 8px 6px; border: 1px solid #dcc7ad; border-radius: 13px; background: #fff; color: #72523b; font-size: 13px; font-family: inherit; }
.takehome-choice[aria-pressed="true"], .takehome-template[aria-pressed="true"] { border: 2px solid #c5894f; background: #fff0d9; }
.takehome-templates { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-gap: 8px; margin-top: 12px; }
.takehome-template { min-width: 0; padding: 4px; border: 1px solid #ddcab3; border-radius: 13px; background: #fffdf8; color: #72543e; font-family: inherit; }
.takehome-template canvas { display: block; width: 100%; height: auto; max-width: 100px; margin: auto; }
.takehome-template span { display: block; font-size: 12px; line-height: 1.6; padding-bottom: 3px; white-space: nowrap; }
.takehome-cream { display: flex; align-items: center; min-height: 44px; font-size: 13px; margin-top: 7px; color: #80644e; }
.takehome-cream input { width: 20px; height: 20px; margin: 0 8px 0 0; }
.takehome-preview { max-width: 440px; margin: 16px auto 0; border: 1px solid #e7dbc9; border-radius: 17px; overflow: hidden; background-color: #fff; background-image: linear-gradient(45deg,#f0ece5 25%,transparent 25%),linear-gradient(-45deg,#f0ece5 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#f0ece5 75%),linear-gradient(-45deg,transparent 75%,#f0ece5 75%); background-size: 20px 20px; background-position: 0 0,0 10px,10px -10px,-10px 0; }
.takehome-preview > canvas { width: 100%; height: auto; display: block; }
.takehome-caption { margin: 10px 0 7px; text-align: center; font-size: 12px; color: #8b725c; line-height: 1.65; }
.takehome-status { margin: 0; min-height: 36px; font-size: 13px; line-height: 1.6; text-align: center; color: #785d45; }
.takehome-footer { flex: 0 0 auto; padding: 12px 20px 10px; padding-bottom: calc(10px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); border-top: 1px solid #e8d6bd; background: #fffaf2; }
.takehome-actions { display: flex; }
.takehome-actions > button { flex: 1 1 0; min-width: 0; min-height: 48px; border-radius: 16px; font: inherit; font-size: 15px; font-weight: 600; }
.takehome-actions > button + button { margin-left: 10px; }
.takehome-save { border: 1px solid #c98243; background: #d99a5b; color: #fff; }
.takehome-post { border: 1px solid #d6b68e; background: #fff0d8; color: #785134; }
.takehome-native-note { margin: 8px 0 0; font-size: 12px; line-height: 1.5; text-align: center; color: #92765d; }
.takehome-dialog button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.takehome-dialog button:active:not(:disabled) { transform: translateY(1px); }
.takehome-dialog button:focus, .takehome-dialog input:focus { outline: 3px solid #8eaaa3; outline-offset: 2px; }
.takehome-dialog button:disabled { cursor: default; opacity: .5; }
@media (max-width: 600px) { .takehome-dialog { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; }
  .takehome-header { padding-top: 72px; padding-top: calc(var(--xhs-overlay-clearance-top, 56px) + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 12px); padding-right: 16px; padding-left: 16px; }
  .takehome-scroll { padding-left: 14px; padding-right: 14px; } .takehome-footer { padding-left: 14px; padding-right: 14px; }
  .takehome-header h2 { font-size: 22px; }
}
@media (max-height: 500px) { .takehome-dialog { height: 100%; width: 100%; max-width: none; max-height: none; border-radius: 0; }
  .takehome-header { padding-top: 54px; padding-top: calc(var(--xhs-overlay-clearance-top, 44px) + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 6px); padding-bottom: 8px; }
  .takehome-header h2 { font-size: 19px; } .takehome-eyebrow { display: none; } .takehome-preview { max-width: 330px; }
  .takehome-footer { padding-top: 8px; padding-bottom: 6px; padding-bottom: calc(6px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))); }
  .takehome-native-note { margin-top: 4px; } }
@media (prefers-reduced-motion: reduce) { .takehome-dialog button:active:not(:disabled) { transform: none; } }
.takehome-adjust{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.takehome-adjust[hidden]{display:none}.takehome-adjust button{flex:1;min-height:44px;padding:6px}

.encounter-dialog{background:#fff8ee;border:2px dashed #c5b6a4;box-shadow:0 12px 32px rgba(92,73,57,.13)}.encounter-dialog h2{color:#87745e}.encounter-dialog .encounter-subtitle{font-size:14px;color:#8f8070}
