.eam-app, .eam-app * { box-sizing: border-box; }
.eam-app { direction: rtl; width: min(100%, 640px); margin: 26px auto; padding: 24px;
  background: linear-gradient(150deg, #fffaff 0%, #f7fbff 100%); color:#302841;
  border: 2px solid #f3d8f1; border-radius: 26px; box-shadow: 0 16px 45px #492e7b12;
  font-family: Tahoma, Arial, sans-serif; text-align: center; line-height:1.8; }
.eam-app header { display:flex; gap:14px; align-items:center; justify-content:center; margin:0 0 18px; text-align:right; }
.eam-app header .eam-heart { width:70px; height:70px; display:grid; place-items:center; font-size:50px;
  color:#ff4b9b; background:#ffe2f0; border-radius:22px; transform:rotate(-6deg); }
.eam-app h1 { font-size: clamp(24px, 5vw, 35px); margin:0; line-height:1.35; color:#5b3380; }
.eam-app h2 { color:#ad397f; font-size:26px; }
.eam-app header p { color:#856a99; margin:2px 0; font-size:13px; }
.eam-app .eam-panel { background:#fff; border:1px solid #f2e9f6; border-radius:23px; padding:21px 17px; }
.eam-app [hidden] { display:none !important; }
.eam-app .eam-emoji { font-size:52px; margin:13px auto 18px; letter-spacing:8px; }
.eam-app p { margin:9px 0 18px; }
.eam-app button { appearance:none; -webkit-appearance:none; border:1px solid #efdaf1; background:#fff; color:#75437e;
  border-radius:15px; padding:13px 20px; min-height:52px; font-size:16px; font-family:inherit; font-weight:bold;
  cursor:pointer; touch-action:manipulation; }
.eam-app button.eam-main { background:linear-gradient(135deg,#ff4b9b,#d63e97); color:#fff; border:0;
  box-shadow:0 6px 14px #ed66ac45; font-size:18px; }
.eam-app button:disabled { opacity:.54; cursor:not-allowed; box-shadow:none; }
.eam-app button:focus-visible { outline:3px solid #50a5ff; outline-offset:3px; }
.eam-app .eam-message { margin:0 0 14px; padding:11px 13px; border:1px solid #a4d5af; background:#f0fff4;
  border-radius:12px; color:#245a37; font-size:14px; }
.eam-app .eam-message.eam-error { border-color:#ff9bb0; background:#fff0f2; color:#8b214b; }
.eam-app .eam-video-wrap { position:relative; background:#191c28; overflow:hidden; border-radius:15px; }
.eam-app video { width:100%; height:auto; max-height:65vh; display:block; object-fit:contain; }
.eam-app .eam-guide { position:absolute; inset:9% 12%; border:3px dashed #ff70b5; border-radius:8px;
  pointer-events:none; box-shadow:0 0 0 200vmax #17161b25; }
.eam-app .eam-tip { color:#765d86; font-size:13px; line-height:1.8; margin:12px 0; }
.eam-app .eam-actions { display:flex; gap:9px; justify-content:center; flex-wrap:wrap; margin-top:18px; }
.eam-app #eam-adjust { display:block; width:100%; max-height:360px; object-fit:contain; border-radius:10px;
  background:#f8f2fa; touch-action:none; border:1px solid #eeddeb; }
.eam-app .eam-result { margin:14px auto; padding:10px; background:#fcfbfd; border:1px solid #eee4f2;
  border-radius:15px; max-width:440px; }
.eam-app .eam-result img { display:block; width:100%; max-height:500px; object-fit:contain; }
.eam-app footer { color:#907f9d; font-size:11px; margin:17px 0 0; }
@media (max-width:480px) {
  .eam-app { padding:12px; margin:10px auto; border-radius:20px; }
  .eam-app header .eam-heart { width:52px; height:52px; font-size:38px; border-radius:14px; }
  .eam-app .eam-panel { padding:14px 11px; }
  .eam-app .eam-actions button { flex:1 1 100%; }
}
/* Elina World v2 hub: all activities stay inside the same private child app. */
.eam-app { max-width:760px; background:linear-gradient(145deg,#fff7fe,#f5fbff 62%,#fffbee); }
.eam-app .eam-header { display:flex; align-items:center; text-align:right; justify-content:center; gap:15px; }
.eam-app .eam-header-icon { width:74px; height:74px; flex:none; display:grid; place-items:center; font-size:41px;
  background:linear-gradient(135deg,#fff0ab,#ffd7ec); border-radius:22px; }
.eam-app .eam-stars-pill { display:inline-block; background:#fff2bf; color:#7a571b; padding:5px 15px; border-radius:99px;
  font-size:16px; border:1px solid #f5d77c; margin:4px 0 14px; }
.eam-app .eam-navigation { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:12px 0 18px; }
.eam-app .eam-navigation button { min-width:0; background:#fff; border:2px solid #f1e1f6; padding:12px 5px;
  font-size:12px; line-height:1.5; border-radius:19px; box-shadow:0 5px 15px #c8a1da14; color:#69467d; }
.eam-app .eam-navigation button span { display:block; font-size:31px; line-height:1.5; }
.eam-app .eam-navigation button.eam-active { border-color:#fc78b5; background:#fff0f8; color:#a12873; }
.eam-app .eam-screen { background:#fff; border:1px solid #f1e9f7; border-radius:22px; padding:18px; min-height:260px; }
.eam-app .eam-module-heading h2 { margin:1px 0 4px; font-size:24px; color:#79418c; }
.eam-app .eam-module-heading p { margin:4px 0 18px; color:#8e7397; font-size:14px; }
.eam-app .eam-subtitle { display:inline-block; padding:6px 14px; background:#f5edff; border-radius:30px; font-size:14px; }
.eam-app .eam-screen .eam-panel { box-shadow:none; }
.eam-app .eam-list { display:flex; flex-direction:column; gap:11px; margin:12px auto; }
.eam-app .eam-list-card { display:flex; align-items:center; gap:12px; padding:13px 14px; border:1px solid #ece4f1;
  background:linear-gradient(125deg,#fff,#fcf8ff); border-radius:17px; text-align:right; }
.eam-app .eam-item-icon { display:grid; flex:none; place-items:center; font-size:29px; width:47px; height:47px;
  background:#fff0fa; border-radius:14px; }
.eam-app .eam-item-info { display:flex; flex:1; flex-direction:column; min-width:0; gap:4px; color:#4e365e; font-size:15px; }
.eam-app .eam-item-info small { color:#91799e; font-size:12px; }
.eam-app .eam-small-button { font-size:12px; min-height:40px; padding:8px 12px; color:#a52f7e; background:#ffeaf7; border:0; white-space:nowrap; }
.eam-app .eam-empty { padding:16px; color:#8e799d; background:#fcf8ff; border-radius:13px; }
.eam-app .eam-star-big { font-size:53px; margin:15px 0 22px; background:#fff4c9; padding:16px; border-radius:20px; color:#92631c; }
.eam-app .eam-point { color:#bc7b24; font-size:18px; }
.eam-app .eam-story-item { width:100%; display:flex; align-items:center; gap:14px; text-align:right; font-size:16px;
  color:#684676; padding:10px 15px; border:1px solid #f0dff3; background:#fffbff; }
.eam-app .eam-story-item:hover { background:#fff1fb; }
.eam-app .eam-story-info { display:flex; flex-direction:column; gap:2px; align-items:flex-start; }
.eam-app .eam-story-info strong { font-size:16px; }
.eam-app .eam-story-type { font-size:12px; color:#9a4881; background:#fff0f8;
  border-radius:99px; padding:2px 10px; margin:0; }
.eam-app .eam-story-reader { margin:18px 0; padding:20px; border-radius:18px; background:#fffdf4; text-align:right;
  border:1px solid #f0e8cb; }
.eam-app #eam-story-title { font-size:23px; color:#7e5286; }
.eam-app #eam-story-body { white-space:pre-line; line-height:2.35; font-size:17px; color:#483b4c; }
.eam-app .eam-story-media { display:flex; flex-direction:column; gap:17px; margin:18px 0 8px; }
.eam-app .eam-story-media-card { padding:13px; background:#fff; border:1px solid #ecdff2; border-radius:16px; }
.eam-app .eam-story-media-card strong { display:block; margin-bottom:11px; color:#8853a4; font-size:15px; }
.eam-app .eam-story-media-card img { display:block; width:100%; max-height:550px; object-fit:contain; border-radius:10px; background:#fff9fd; }
.eam-app .eam-story-media-card audio { display:block; width:100%; min-height:50px; }
.eam-app .eam-media-loading { color:#8e789b; font-size:13px; margin:8px 0; }
.eam-app #eam-story-back { margin:0 0 13px; background:#fff4e0; color:#806018; }
.eam-app .eam-hub-message { padding:12px; background:#eaf9f0; color:#2d604a; border-radius:15px; margin:12px 0; }
.eam-app .eam-hub-message.eam-error { background:#fff1f5; color:#9e285d; }
.eam-app .eam-private-caption { font-size:12px; color:#a392ac; margin:18px 0 0; }
@media(max-width:580px) {
 .eam-app .eam-navigation { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .eam-app .eam-screen { padding:11px; }
 .eam-app .eam-list-card { gap:8px; flex-wrap:wrap; }
 .eam-app .eam-small-button { margin-right:auto; }
 .eam-app .eam-header-icon { width:55px; height:55px; font-size:32px; }
}
/* Five modular activities fit cleanly on larger screens. */
@media(min-width:581px) {
  .eam-app .eam-navigation { grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); }
}
@media(max-width:580px) {
  .eam-app .eam-navigation button:last-child:nth-child(odd) { grid-column:span 2; }
}

/* v2.7: child-friendly recipient selector and little piggy-bank dashboard. */
.eam-recipient-choice{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:13px 0 20px}
.eam-recipient-choice button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:98px;border:3px solid #ead1f2;border-radius:21px;background:#fff;box-shadow:0 4px 14px #8b47a515;color:#753d80;cursor:pointer;font:inherit}
.eam-recipient-choice button span{font-size:40px;line-height:1.15}
.eam-recipient-choice button small{font-size:12px;font-weight:700}
.eam-recipient-choice button[aria-pressed="true"]{border-color:#d849a1;background:#ffecf9;box-shadow:0 0 0 2px #fdafdb44}
.eam-wallet-child-card{background:linear-gradient(145deg,#ffebf8,#efe7ff,#e5f9ff);border:2px solid #f0ccf5;border-radius:27px;padding:22px 15px;text-align:center;margin:14px auto;max-width:480px;box-shadow:0 12px 26px #9e65b320}
.eam-wallet-purse{font-size:90px;line-height:1.4;filter:drop-shadow(0 7px 9px #b673c74c)}
.eam-wallet-child-card strong{display:block;font-size:clamp(30px,7vw,42px);color:#7b37a3}
.eam-wallet-child-card p{font-size:clamp(21px,5vw,30px);font-weight:800;color:#bd3d81;margin:11px 0}
.eam-wallet-listen{font:inherit;font-size:19px;font-weight:800;color:#7731a0;background:#fff;border:2px solid #e5c1f3;border-radius:20px;padding:13px 20px;cursor:pointer}
.eam-wallet-alert{background:#fff0bd!important;border:2px solid #f5ba45;border-radius:16px;padding:12px;color:#8a4400!important;font-size:16px!important;font-weight:800}
@media(max-width:360px){.eam-recipient-choice button{min-height:80px}.eam-recipient-choice button span{font-size:32px}.eam-recipient-choice button small{font-size:11px}}
