/* my-reading.css — "ดวงช่วงนี้ของคุณ" on the ดวงฉัน page. Tracker look, mooncake-box world. */

.my-read { margin: 18px 0 0; text-align: left; }

/* hero: lacquer lid */
.my-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 18px 16px 18px; border-radius: 8px; border: 1px solid #BDA167; color: #F3D9A0;
  background: radial-gradient(120% 90% at 90% 0%, #B3303A 0%, rgba(179, 48, 58, 0) 55%), linear-gradient(160deg, #9E1C25 0%, #7A1219 100%);
  box-shadow: 0 10px 22px -10px rgba(122, 18, 25, .55);
}
.my-hero::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(215, 184, 124, .5); border-radius: 5px; pointer-events: none; z-index: -1; }
.my-eyebrow { font: 500 12.5px/1.4 'Kanit', sans-serif; color: #E9CFA4; letter-spacing: .2px; }
.my-hero-row { display: grid; grid-template-columns: auto 1fr; gap: 6px 13px; align-items: center; margin-top: 10px; }
.my-seal {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #F3D9A0; color: #7A1219; font: 700 29px/1 serif;
  box-shadow: 0 0 0 3px #7A1219, 0 0 0 4px #D7B87C;
}
.my-title { margin: 0; font: 600 25px/1.25 'Kanit', sans-serif; color: #FFF3D6; }
.my-line { margin: 5px 0 0; font: 14px/1.6 'Sarabun', sans-serif; color: #F1DDB5; }
.my-score { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(215, 184, 124, .35); }
.my-score .my-ring { flex: none; }
.my-score-n b { display: block; font: 600 30px/1 'Oswald', sans-serif; color: #FFF3D6; }
.my-score-n small { font: 500 12px 'Kanit', sans-serif; color: #E9CFA4; }

/* do / watch */
.my-dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 0; }
.my-dodont > div { position: relative; padding: 12px 13px; border-radius: 8px; border: 1px solid #D9C8A8; background: #FFF9EB; }
.my-dodont b { display: block; font: 600 13px 'Kanit', sans-serif; margin-bottom: 3px; }
.my-dodont span { font: 13.5px/1.55 'Sarabun', sans-serif; color: #5E4A3D; }
.my-do b { color: #4F6B3A; }
.my-dont b { color: #951A22; }
.my-do { box-shadow: inset 3px 0 0 #6E7B5C; }
.my-dont { box-shadow: inset 3px 0 0 #951A22; }

/* areas */
.my-h { margin: 22px 0 10px; font: 600 18px/1.3 'Kanit', sans-serif; color: #7A2927; }
.my-areas { display: grid; gap: 10px; }
.my-area {
  position: relative; display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: start;
  padding: 13px 13px 12px; background: #FFFDF8; border: 1px solid #D9C8A8; border-radius: 8px;
}
.my-area::before { content: ""; position: absolute; inset: 4px; border: 1px solid #E4D2A9; border-radius: 5px; pointer-events: none; }
.my-area.is-focus { background: #FFF6E3; border-color: #C9A868; }
.my-area-ring { position: relative; width: 58px; height: 58px; }
.my-area-ring span { position: absolute; inset: 0; display: grid; place-items: center; font: 600 18px 'Oswald', sans-serif; color: #382C27; }
.my-area-top { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; }
.my-area-top b { font: 600 15.5px/1.35 'Kanit', sans-serif; color: #382C27; }
.my-area-top i, .my-area-top em { font: 500 11px/1.6 'Kanit', sans-serif; font-style: normal; padding: 0 8px; border-radius: 999px; }
.lv-hi { background: #E7EDDC; color: #3F5A2C; }
.lv-mid { background: #F3E8CF; color: #7A5B25; }
.lv-lo { background: #F6DEDA; color: #8A1C24; }
.my-area-top em { background: #951A22; color: #FFF3D6; }
.my-area p { margin: 4px 0 0; font: 13.5px/1.6 'Sarabun', sans-serif; color: #5E4A3D; }
.my-best { margin-top: 6px; font: 500 12.5px 'Kanit', sans-serif; color: #9A712F; }

.my-actions:empty { display: none; }
.my-actions .save-result { margin: 14px 0 4px; }

/* 7-day */
.my-week { margin-top: 16px; }
.my-week .trk-bar { cursor: default; }
.my-week-note { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font: 13px 'Sarabun', sans-serif; color: #5E4A3D; }
.my-week-note i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.dot-go { background: #951A22; }
.dot-rest { background: #E4D2A9; border: 1px solid #C9B083; }

/* year */
.my-year { position: relative; margin-top: 4px; padding: 16px; border-radius: 8px; border: 1px solid #C6AD78; background: #F1E6CF; box-shadow: inset 0 0 0 4px #FBF6E9, inset 0 0 0 5px #DBC79A; }
.my-year-k { font: 500 12.5px 'Kanit', sans-serif; color: #86715E; }
.my-year-t { font: 600 20px/1.3 'Kanit', sans-serif; color: #7A2927; margin-top: 2px; }
.my-year p { margin: 6px 0 0; font: 13.5px/1.6 'Sarabun', sans-serif; color: #5E4A3D; }
.my-chong { padding-left: 10px; border-left: 3px solid #6E7B5C; }
.my-chong.is-chong { border-left-color: #951A22; }
.my-next { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #C9B083; font: 13px 'Sarabun', sans-serif; color: #5E4A3D; }
.my-next b { font-family: 'Kanit', sans-serif; font-weight: 600; color: #7A2927; margin: 0 4px; }
.my-how { margin: 12px 0 0; font: 11.5px/1.6 'Sarabun', sans-serif; color: #9A8573; text-align: center; }

/* the technical chart, folded */
.my-deep { margin: 16px 0 0; border: 1px solid #D9C8A8; border-radius: 8px; background: #FFFDF8; }
.my-deep > summary {
  list-style: none; cursor: pointer; padding: 13px 40px 13px 15px; position: relative;
  font: 600 15px/1.4 'Kanit', sans-serif; color: #7A2927;
}
.my-deep > summary::-webkit-details-marker { display: none; }
.my-deep > summary::after { content: "›"; position: absolute; right: 16px; top: 50%; transform: translateY(-55%) rotate(90deg); font: 400 24px/1 Georgia, serif; color: #B99B60; transition: transform .2s ease; }
.my-deep[open] > summary::after { transform: translateY(-45%) rotate(-90deg); }
.my-deep > summary small { display: block; font: 400 12px 'Sarabun', sans-serif; color: #86715E; }
.my-deep-body { padding: 0 12px 12px; }
.my-privacy { margin: 12px 0 0; font: 11.5px/1.6 'Sarabun', sans-serif; color: #9A8573; text-align: center; }
.my-privacy button { background: none; border: 0; padding: 0; font: inherit; color: #951A22; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

@media (min-width: 720px) {
  .my-areas { grid-template-columns: 1fr 1fr; }
  .my-hero-row { grid-template-columns: auto 1fr auto; }
  .my-score { grid-column: auto; margin: 0; padding: 0 0 0 16px; border-top: 0; border-left: 1px solid rgba(215, 184, 124, .35); }
}
@media (max-width: 359px) {
  .my-dodont { grid-template-columns: 1fr; }
  .my-title { font-size: 22px; }
}

/* full-report PNG: button + tall preview in the share dialog */
.my-actions { display: grid; gap: 10px; margin: 14px 0 4px; }
.my-actions .save-result { margin: 0; }
.my-full-btn { width: 100%; }
dialog.dialog-full #shareCanvas { max-height: none; }
.formats button[hidden] { display: none; }
dialog.dialog-full #downloadCard { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -10px 18px 4px var(--cream, #FAF6EE); }

/* aspect-safe preview: never stretch the card (width auto + max constraints keep the canvas ratio) */
#shareCanvas { width: auto !important; max-width: 100%; height: auto; margin: 0 auto; }
dialog.dialog-full #shareCanvas { width: 100% !important; }

/* phone-friendly save: the preview is a real image (long-press → save), canvas stays as the drawing surface */
#sharePreviewImg { display: none; }
dialog.is-touch #shareCanvas { display: none !important; }
dialog.is-touch #sharePreviewImg { display: block; width: auto; max-width: 100%; height: auto; max-height: 56dvh; margin: 0 auto; -webkit-touch-callout: default; }
dialog.is-touch.dialog-full #sharePreviewImg { width: 100%; max-height: none; }
