/* Build 401 — portrait-first Journal. Scoped final layer; legacy report styles stay intact. */
#root .j45-overlay.j401-overlay{padding:max(10px,env(safe-area-inset-top,0px)) max(10px,env(safe-area-inset-right,0px)) max(10px,env(safe-area-inset-bottom,0px)) max(10px,env(safe-area-inset-left,0px))!important;background:rgba(3,10,17,.76);isolation:isolate}
#root .j45-dialog.j401-dialog{position:relative;width:min(600px,100%)!important;height:min(820px,calc(100vh - 24px))!important;min-height:0!important;max-height:100%!important;border:1px solid #b79b61a8!important;border-radius:24px!important;background:radial-gradient(ellipse at 85% 0%,#254a4e55,transparent 48%),linear-gradient(145deg,#172f3a,#0b1b29 62%,#101e2c)!important;box-shadow:0 24px 80px #000a!important;color:#f2eddf;font:14px/1.4 system-ui,sans-serif;animation:j401-sheet-in .22s ease-out;overflow:hidden!important;display:flex;flex-direction:column}
@supports(height:100dvh){#root .j45-dialog.j401-dialog{height:min(820px,calc(100dvh - 24px))!important}}
#root .j401-dialog *,#root .j401-dialog *::before,#root .j401-dialog *::after{box-sizing:border-box}
#root .j401-dialog button{font:650 14px/1.25 system-ui,sans-serif;min-height:44px;touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer}
#root .j401-dialog button:disabled{cursor:default}
#root .j401-dialog button:focus-visible,#root .j401-dialog [tabindex]:focus-visible{outline:2px solid #f9df99;outline-offset:3px}
#root .j401-dialog>header{padding:12px 16px!important;min-height:68px;gap:12px;flex:0 0 auto;background:linear-gradient(105deg,#e9bb5f0d,transparent)!important;border-bottom:1px solid #e9ca7e1c!important}
#root .j401-dialog>header h1{margin:0;font:700 27px/1.1 Georgia,serif!important;color:#fff0ce;letter-spacing:.01em}
#root .j401-dialog>header small{display:block;color:#bcbba9;font:600 10px/1.4 system-ui;letter-spacing:.16em;margin-bottom:3px}
#root .j401-dialog .j401-brand{display:grid;place-items:center;flex:0 0 40px;height:44px;border-radius:12px;border:1px solid #d3b16d66;background:linear-gradient(150deg,#9c79342a,#132b35);color:#edcf8c}
#root .j401-dialog .j401-brand svg{width:25px;height:25px}
#root .j401-dialog>header>button{margin-left:auto;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border-radius:50%;border:1px solid #b9c6bb33;background:#132936;color:#e8e2d1;display:grid;place-items:center;font-size:26px}
#root .j401-dialog>.j45-tabs.j401-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));margin:0!important;padding:8px 16px 0!important;gap:8px;background:transparent!important;overflow:visible;border:0;flex:0 0 auto}
#root .j401-dialog>.j401-tabs button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:44px;padding:10px 8px!important;border:1px solid #b5c6c51f;border-radius:12px!important;background:#0b1d29;color:#b9c9ca;font:650 14px/1.25 system-ui!important}
#root .j401-dialog>.j401-tabs button[aria-selected=true]{border-color:#d3b16d88;color:#f9de9a;background:linear-gradient(120deg,#5f4d2f80,#263938);box-shadow:inset 0 1px #fff1b61f}
#root .j401-dialog>.j401-tabs .j50-unread-badge{display:grid;place-items:center;min-width:21px;min-height:21px;padding:2px 5px;margin:0;border-radius:7px;background:#f1cf89;color:#182d35;font:750 11px/1.2 system-ui}
#root .j401-dialog .j45-content.j401-content{padding:16px!important;min-width:0;min-height:0!important;overflow-y:auto!important;overflow-x:hidden;overscroll-behavior:contain;scroll-padding:16px;scrollbar-width:thin;scrollbar-color:#667e7b transparent;scrollbar-gutter:auto;flex:1 1 auto!important;-webkit-overflow-scrolling:touch}
#root .j401-dialog .j401-icon{display:block;width:20px;height:20px;flex:0 0 auto}
#root .j401-dialog .j401-objectives{width:100%;min-width:0}
#root .j401-dialog .j401-objectives h2,#root .j401-dialog .j401-objectives h3,#root .j401-dialog .j401-objectives h4,#root .j401-dialog .j401-objectives p{margin:0}
#root .j401-dialog .j401-periods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;border:1px solid #b9c8c520;border-radius:13px;background:#071823}
#root .j401-dialog .j401-periods button{position:relative;display:flex;gap:5px;align-items:center;justify-content:center;padding:8px 3px;min-width:0;min-height:44px;border:1px solid transparent;border-radius:9px;background:transparent;color:#adc1c5;font-size:13px}
#root .j401-dialog .j401-periods button[aria-pressed=true]{background:linear-gradient(145deg,#315253,#213c46);color:#fff0ce;border-color:#8b9c7c5c;box-shadow:0 2px 7px #0003}
#root .j401-dialog .j401-count{display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border-radius:6px;background:#dbbd73;color:#112b35;font-size:10px;font-weight:800;line-height:1}
#root .j401-dialog .j401-journey-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:18px 0 12px}
#root .j401-dialog .j401-eyebrow{font:750 10px/1.4 system-ui;letter-spacing:.13em;color:#c5bb91}
#root .j401-dialog .j401-journey-head h2{font:700 23px/1.2 Georgia,serif;letter-spacing:-.02em;color:#f5e9c9;margin-top:3px}
#root .j401-dialog .j401-reset{display:flex;align-items:center;gap:5px;max-width:126px;color:#aebfc1;font-size:12px;line-height:1.35;text-align:right}
#root .j401-dialog .j401-reset svg{width:15px;height:15px;color:#c6b782}
#root .j401-dialog .j401-journey{padding:13px;border:1px solid #bca36570;border-radius:18px;background:radial-gradient(ellipse at 50% 0%,#b9943a19,transparent 58%),linear-gradient(135deg,#1d3540,#102430);box-shadow:inset 0 1px #f6e0a60a,0 6px 18px #0002}
#root .j401-dialog .j401-progress-summary{display:flex;justify-content:space-between;align-items:center;gap:7px;min-height:21px;margin-bottom:8px;font-size:12px}
#root .j401-dialog .j401-progress-summary strong{color:#f0e6c9;font-weight:650}
#root .j401-dialog .j401-progress-summary>span{color:#bcd7c8;font-size:11px;text-align:right}
#root .j401-dialog .j401-track-progress{height:5px;overflow:hidden;background:#071622;border-radius:6px;margin:0 2px 9px;border:1px solid #acc0a21c}
#root .j401-dialog .j401-track-progress>span{display:block;width:100%;height:100%;background:linear-gradient(90deg,#63aa96,#e5c673);border-radius:inherit;transform-origin:left center;transition:transform .42s ease}
#root .j401-dialog .j401-chest-track{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
#root .j401-dialog .j401-chest{position:relative;min-width:0;min-height:98px;padding:4px 3px 7px;border:1px solid #839f9d35;border-radius:12px;color:#9db1b3;background:linear-gradient(155deg,#18313b,#0d222d);transition:transform .14s ease,border-color .14s ease}
#root .j401-dialog .j401-chest:active{transform:scale(.97)}
#root .j401-dialog .j401-chest.is-selected{border-color:#e2c98c;box-shadow:inset 0 0 0 1px #e2c98c22,0 0 16px #ddb95812}
#root .j401-dialog .j401-chest.is-ready{background:radial-gradient(ellipse at 50% 40%,#bc914d45,transparent 75%),linear-gradient(145deg,#3d3b2c,#16313a);color:#ffdfa0}
#root .j401-dialog .j401-chest.is-collected{background:#102c31;color:#99d9bf}
#root .j401-dialog .j401-chest-number{position:absolute;left:7px;top:6px;font-size:9px;color:#c5ba9466;letter-spacing:.08em}
#root .j401-dialog .j401-chest-art{display:grid;place-items:center;height:64px;overflow:visible}
#root .j401-dialog .j401-chest-art img{width:70px;height:70px;object-fit:contain}
#root .j401-dialog .j401-chest.is-locked .j401-chest-art{opacity:.7}
#root .j401-dialog .j401-chest.is-ready .j401-chest-art{animation:j401-chest-ready .55s ease-out}
#root .j401-dialog .j401-chest-state{display:flex;align-items:center;justify-content:center;gap:4px;font-size:12px;line-height:1.3}
#root .j401-dialog .j401-chest-state svg{width:13px;height:13px}
#root .j401-dialog .j401-chest-detail{padding:12px 0 0;margin-top:12px;border-top:1px solid #b7ba8e2e}
#root .j401-dialog .j401-chest-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
#root .j401-dialog .j401-chest-heading h3{margin-top:3px;font:700 19px/1.2 Georgia,serif;color:#f5e7c1;overflow-wrap:anywhere}
#root .j401-dialog .j401-collected-mark{display:grid;place-items:center;width:31px;height:31px;flex:0 0 auto;border-radius:50%;border:1px solid #6ecda252;background:#183e38;color:#a3e4bd}
#root .j401-dialog .j401-rewards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;list-style:none;padding:0;margin:0;min-width:0}
#root .j401-dialog .j401-reward{display:flex;align-items:center;gap:6px;min-width:0;min-height:56px;padding:7px 6px;border:1px solid #b6cccd21;border-radius:10px;background:#0a1c29c4;overflow:hidden}
#root .j401-dialog .j401-reward-art{display:grid;place-items:center;width:27px;height:30px;flex:0 0 27px;color:#b4cbd2}
#root .j401-dialog .j401-reward-art img{width:31px;height:31px;object-fit:contain;max-width:none}
#root .j401-dialog .j401-reward-art svg{width:24px;height:24px}
#root .j401-dialog .j401-reward-copy{min-width:0;display:flex;flex-direction:column;gap:1px}
#root .j401-dialog .j401-reward-copy strong{font:750 14px/1.2 system-ui;color:#fff1cc;font-variant-numeric:tabular-nums}
#root .j401-dialog .j401-reward-copy>span{font-size:12px;line-height:1.25;color:#c1cfd0;overflow-wrap:anywhere}
#root .j401-dialog .j401-reward-star .j401-reward-art{color:#cdb4ff}
#root .j401-dialog .j401-reward-guild .j401-reward-art{color:#e3c879}
#root .j401-dialog .j401-reward-wood .j401-reward-art{color:#cda779}
#root .j401-dialog .j401-reward-food .j401-reward-art{color:#d4ce8b}
#root .j401-dialog .j401-reward-gear{border-color:#8ab5bc4c}
#root .j401-dialog .j401-gear-note{margin-top:7px;font-size:11px;color:#a9bbbb}
#root .j401-dialog .j401-chest-hint{margin-top:10px;color:#c2cabc;font-size:12px;line-height:1.4}
#root .j401-dialog button.j401-primary{display:flex;align-items:center;justify-content:center;gap:9px;padding:11px 15px;min-height:46px;border:1px solid #f3d68c;border-radius:11px;background:linear-gradient(180deg,#f2d58d,#d9b56c);box-shadow:inset 0 1px #fff4ce88,0 3px 0 #75613a66;color:#182e33;font-weight:800;transition:transform .12s ease,opacity .12s ease}
#root .j401-dialog button.j401-primary:active{transform:translateY(2px);box-shadow:inset 0 1px #fff4ce55}
#root .j401-dialog button.j401-primary:disabled{opacity:.62}
#root .j401-dialog .j401-chest-claim{width:100%;margin-top:12px}
#root .j401-dialog .j401-chest-claim svg:last-child{margin-left:auto;width:17px;height:17px}
#root .j401-dialog .j401-task-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:20px 1px 10px}
#root .j401-dialog .j401-task-heading h3{font:700 19px/1.2 Georgia,serif;color:#f0e8d1}
#root .j401-dialog .j401-task-heading>span{font-size:12px;color:#b5c6bf}
#root .j401-dialog .j401-tasks{display:grid;gap:10px}
#root .j401-dialog .j401-task{padding:13px;border-radius:15px;border:1px solid #acbdc12c;background:linear-gradient(135deg,#1c3540,#112733);min-width:0}
#root .j401-dialog .j401-task.is-ready{border-color:#ba9c5f88;background:linear-gradient(125deg,#3b4235,#183039 75%)}
#root .j401-dialog .j401-task.is-collected{background:#112731;border-color:#96bc9e24}
#root .j401-dialog .j401-task-top{display:flex;align-items:flex-start;gap:10px}
#root .j401-dialog .j401-task-icon{display:grid;place-items:center;width:38px;height:40px;flex:0 0 38px;border:1px solid #afc5bd30;border-radius:11px;background:#09222b;color:#d5c592}
#root .j401-dialog .j401-task.is-ready .j401-task-icon{border-color:#d5bd7247;color:#f0d48c;background:#3d4635}
#root .j401-dialog .j401-task.is-collected .j401-task-icon{color:#a4d9bd;border-color:#77bfa33d;background:#183c37}
#root .j401-dialog .j401-task-icon svg{width:22px;height:22px}
#root .j401-dialog .j401-task-copy{min-width:0}
#root .j401-dialog .j401-task-copy h4{font:700 15px/1.3 system-ui;color:#f3eddc;overflow-wrap:anywhere}
#root .j401-dialog .j401-task-copy p{margin-top:3px;font-size:13px;line-height:1.4;color:#b7c8c8;overflow-wrap:anywhere}
#root .j401-dialog .j401-task-progress{display:flex;align-items:center;gap:10px;margin-top:12px}
#root .j401-dialog .j401-task-progress progress{display:block;appearance:none;-webkit-appearance:none;flex:1;min-width:0;height:5px;overflow:hidden;border:0;border-radius:5px;background:#081b25;accent-color:#9bcaa4}
#root .j401-dialog .j401-task-progress progress::-webkit-progress-bar{background:#081b25;border-radius:5px}
#root .j401-dialog .j401-task-progress progress::-webkit-progress-value{background:linear-gradient(90deg,#529a8e,#c1cf8b);border-radius:5px;transition:width .35s ease}
#root .j401-dialog .j401-task-progress progress::-moz-progress-bar{background:#91bf9e;border-radius:5px}
#root .j401-dialog .j401-task-progress>span{font-size:11px;color:#c6d5cc;font-variant-numeric:tabular-nums;flex:0 0 auto}
#root .j401-dialog .j401-task-bottom{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-top:12px;flex-wrap:wrap}
#root .j401-dialog .j401-rewards-compact{display:flex;gap:10px;flex-wrap:wrap;flex:1 1 180px}
#root .j401-dialog .j401-rewards-compact .j401-reward{min-height:32px;padding:0;border:0;background:transparent;gap:4px;border-radius:0;overflow:visible}
#root .j401-dialog .j401-rewards-compact .j401-reward-art{width:22px;height:27px;flex-basis:22px}
#root .j401-dialog .j401-rewards-compact .j401-reward-art img{width:26px;height:26px}
#root .j401-dialog .j401-rewards-compact .j401-reward-art svg{width:20px;height:20px}
#root .j401-dialog .j401-rewards-compact .j401-reward-copy strong{font-size:13px}
#root .j401-dialog .j401-rewards-compact .j401-reward-copy>span{font-size:11px}
#root .j401-dialog .j401-task-bottom button.j401-primary{flex:0 0 auto;min-width:86px;min-height:44px;padding:10px 13px;margin-left:auto}
#root .j401-dialog .j401-in-progress,#root .j401-dialog .j401-task-collected{display:flex;align-items:center;gap:4px;min-height:32px;color:#aebfbd;font-size:12px;margin-left:auto}
#root .j401-dialog .j401-task-collected{color:#a5d6b8}
#root .j401-dialog .j401-task-collected svg{width:15px;height:15px}
#root .j401-dialog .j401-feedback{padding:12px;margin-top:12px;border:1px solid #c79f7766;border-radius:10px;background:#3b302b;color:#f6dec3;font-size:13px}
#root .j401-dialog .j401-complete-note{display:flex;align-items:flex-start;gap:8px;padding:16px 3px 2px;color:#b0d3bc;font-size:12px}
#root .j401-dialog .j401-complete-note svg{width:18px;height:18px}
#root .j401-dialog .j401-revealing{min-height:100%;display:flex;align-items:center;justify-content:center}
#root .j401-dialog .j401-celebration{position:relative;width:100%;max-width:450px;display:flex;flex-direction:column;align-items:center;text-align:center;padding:14px 1px 3px;animation:j401-receipt-in .3s ease-out}
#root .j401-dialog .j401-reveal-art{position:relative;display:grid;place-items:center;width:160px;height:150px;margin:0 auto 6px;isolation:isolate}
#root .j401-dialog .j401-halo{position:absolute;inset:8px;border:1px solid #d8c48a44;border-radius:50%;background:radial-gradient(circle,#e7c77938,transparent 68%);box-shadow:0 0 50px #9bd8c012;animation:j401-halo .9s ease-out;z-index:-1}
#root .j401-dialog .j401-reveal-art>img{width:136px;height:136px;object-fit:contain;animation:j401-chest-reveal .7s cubic-bezier(.2,.75,.25,1)}
#root .j401-dialog .j401-success-seal{display:grid;place-items:center;width:87px;height:94px;border:1px solid #b7d3a0aa;border-radius:28px;background:linear-gradient(145deg,#446650,#19383c);box-shadow:0 8px 25px #0004,inset 0 1px #f5e0a244;color:#f6e4ab;transform:rotate(-7deg);animation:j401-chest-reveal .6s ease-out}
#root .j401-dialog .j401-success-seal svg{width:48px;height:48px;transform:rotate(7deg)}
#root .j401-dialog .j401-sparks{position:absolute;inset:0;pointer-events:none}
#root .j401-dialog .j401-sparks i{position:absolute;left:calc(50% - 2px);top:calc(50% - 2px);width:4px;height:4px;background:#f8dc8f;border-radius:1px;opacity:0;animation:j401-spark .85s var(--spark-delay) ease-out forwards}
#root .j401-dialog .j401-celebration>.j401-eyebrow{font-size:11px;letter-spacing:.18em;color:#decc92}
#root .j401-dialog .j401-celebration h2{font:700 29px/1.18 Georgia,serif;color:#fff0c9;margin:8px 0;overflow-wrap:anywhere;max-width:100%}
#root .j401-dialog .j401-reveal-subtitle{font-size:13px;color:#bfd1cd;max-width:340px;margin-bottom:22px}
#root .j401-dialog .j401-rewards-reveal{width:100%;gap:9px;text-align:left}
#root .j401-dialog .j401-rewards-reveal .j401-reward{min-height:72px;padding:9px 7px;border-color:#c8b5754a;background:linear-gradient(145deg,#25404b,#142a37);animation:j401-reward-in .4s var(--reward-delay) ease-out both}
#root .j401-dialog .j401-rewards-reveal .j401-reward-art{width:32px;flex-basis:32px}
#root .j401-dialog .j401-rewards-reveal .j401-reward-art img{width:36px;height:36px}
#root .j401-dialog .j401-rewards-reveal .j401-reward-copy strong{font-size:16px}
#root .j401-dialog .j401-reveal-footer{width:100%;margin-top:24px;display:flex;flex-direction:column;gap:13px;align-items:center}
#root .j401-dialog .j401-reveal-footer>span{font-size:12px;color:#b6c9c3}
#root .j401-dialog .j401-reveal-footer button{width:100%;min-height:49px}
#root .j401-dialog [data-motion-paused=true] *,#root .j401-dialog [data-motion-paused=true] *::before,#root .j401-dialog [data-motion-paused=true] *::after{animation-play-state:paused!important;transition:none!important}
/* Report and mail content keeps its existing actions, now inside the same generous frame. */
#root .j401-dialog .j294-notification-tabs button{min-height:48px}
#root .j401-dialog .j47-feed-footer button,#root .j401-dialog .j100-delivery-actions button{min-height:44px}
@media(max-width:370px){
 #root .j401-dialog>header{padding:10px 12px!important;min-height:62px}
 #root .j401-dialog>.j45-tabs.j401-tabs{padding:7px 12px 0!important}
 #root .j401-dialog .j45-content.j401-content{padding:12px!important}
 #root .j401-dialog .j401-journey{padding:10px}
 #root .j401-dialog .j401-rewards{gap:5px}
 #root .j401-dialog .j401-reward{padding:6px 4px;gap:3px}
 #root .j401-dialog .j401-reward-art{width:22px;flex-basis:22px}
 #root .j401-dialog .j401-reward-art img{width:27px;height:27px}
 #root .j401-dialog .j401-reward-copy strong{font-size:13px}
 #root .j401-dialog .j401-reward-copy>span{font-size:11px}
 #root .j401-dialog .j401-journey-head h2{font-size:21px}
 #root .j401-dialog .j401-rewards-reveal{grid-template-columns:repeat(2,minmax(0,1fr))}
 #root .j401-dialog .j401-rewards-reveal .j401-reward-copy>span{font-size:12px}
}
@media(max-width:460px){
 #root .j401-dialog .j401-rewards-reveal{grid-template-columns:repeat(2,minmax(0,1fr))}
 #root .j401-dialog .j401-rewards-reveal .j401-reward{gap:8px;padding:9px}
 #root .j401-dialog .j401-rewards-reveal .j401-reward-copy>span{font-size:12px}
}
@media(max-height:540px){
 #root .j401-dialog>header{min-height:55px;padding:6px 14px!important}
 #root .j401-dialog>header small{display:none}
 #root .j401-dialog .j401-celebration{padding-top:0}
 #root .j401-dialog .j401-reveal-art{height:96px;width:120px}
 #root .j401-dialog .j401-reveal-art>img{width:94px;height:94px}
 #root .j401-dialog .j401-success-seal{width:68px;height:72px;border-radius:20px}
 #root .j401-dialog .j401-reveal-footer{margin-top:14px}
}
@keyframes j401-sheet-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes j401-chest-ready{0%{transform:translateY(3px)}45%{transform:translateY(-4px) rotate(-4deg)}75%{transform:rotate(3deg)}100%{transform:none}}
@keyframes j401-receipt-in{from{opacity:.4;transform:translateY(7px)}to{opacity:1;transform:none}}
@keyframes j401-chest-reveal{0%{opacity:0;transform:translateY(16px) scale(.82)}65%{opacity:1;transform:translateY(-5px) scale(1.04)}100%{opacity:1;transform:none}}
@keyframes j401-halo{from{opacity:0;transform:scale(.55)}60%{opacity:1;transform:scale(1.08)}to{opacity:1;transform:scale(1)}}
@keyframes j401-reward-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes j401-spark{0%{opacity:0;transform:rotate(var(--spark-angle)) translateY(-25px) scale(.5)}20%{opacity:1}100%{opacity:0;transform:rotate(var(--spark-angle)) translateY(-85px) scale(.3)}}
@media(prefers-reduced-motion:reduce){
 #root .j401-dialog,#root .j401-dialog *,#root .j401-dialog *::before,#root .j401-dialog *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
 #root .j401-dialog .j401-sparks{display:none}
}
