/* AgrarMarkt Handy-Design 156 · scoped to the existing phone view. */
#phoneView {
  --phone156-panel: var(--am-panel, #082b2c);
  --phone156-deep: #062426;
  --phone156-line: var(--am-line, #17504d);
  --phone156-muted: #afc5c0;
  --phone156-green: var(--am-green, #59dc48);
  --phone156-font: "Segoe UI", Arial, sans-serif;
  --phone156-icon-call: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2A19.8 19.8 0 0 1 3.1 5.2 2 2 0 0 1 5.1 3h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L9 10.9a16 16 0 0 0 6.1 6.1l1.3-1.3a2 2 0 0 1 2.1-.5c.9.3 1.8.6 2.8.7A2 2 0 0 1 22 16.9Z'/%3E%3C/svg%3E");
  --phone156-icon-book: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M2 7h4M2 12h4M2 17h4M9 17c0-3 7-3 7 0'/%3E%3Ccircle cx='12.5' cy='9' r='2.5'/%3E%3C/svg%3E");
  --phone156-icon-sms: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.4 8.4 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.4 8.4 0 0 1-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6A8.4 8.4 0 0 1 12.5 3h.5a8.5 8.5 0 0 1 8 8v.5Z'/%3E%3Cpath d='M8 10h8M8 14h5'/%3E%3C/svg%3E");
  color: var(--am-text, #f4f8f4);
  padding-top: 28px;
  padding-bottom: 24px;
  line-height: 1.5;
}
#phoneView *, #phoneView *::before, #phoneView *::after { box-sizing: border-box; }
#phoneView [hidden] { display: none !important; }
#phoneView :is(button, input, select, textarea, label, p, output, small, time) {
  font-family: var(--phone156-font);
}
#phoneView :is(button, input, select, textarea) { font-size: 14px; }
#phoneView button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  max-width: 100%;
  padding: 10px 15px;
  border: 1px solid #2a5d59;
  border-radius: 7px;
  background: #103c3d;
  color: #edf6f2;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  box-shadow: none;
  transition: background-color .15s ease, border-color .15s ease;
}
#phoneView button:hover:not(:disabled) { background: #184b48; border-color: #4f8e79; }
#phoneView button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
#phoneView :is(button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--phone156-green);
  outline-offset: 3px;
}
#phoneView input, #phoneView select, #phoneView textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #2c5a56;
  border-radius: 7px;
  background: #052326;
  color: #f4f8f4;
  line-height: 1.5;
  box-shadow: inset 0 1px 3px #00191b33;
}
#phoneView input::placeholder, #phoneView textarea::placeholder { color: #91afaa; opacity: 1; }
#phoneView textarea { min-height: 172px; resize: vertical; }
#phoneView label { display: block; margin: 0; color: #d2e2dd; font-size: 13px; font-weight: 600; }
#phoneView h3 { margin: 0 0 20px; color: #f4f8f4; font-size: 22px; font-weight: 700; line-height: 1.3; }
#phoneView h4 { color: #dceae5; font-size: 16px; }
#phoneView .sms-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 24px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--phone156-line);
}
#phoneView .sms-header .eyebrow { margin: 0 0 6px; color: var(--phone156-green); font-size: 11px; letter-spacing: .13em; }
#phoneView .sms-header h2 { margin: 0; font-size: 34px; font-weight: 700; line-height: 1.1; letter-spacing: -.2px; }
#phoneView #phone128Policy { margin: 10px 0 0; color: var(--phone156-muted); font-size: 13px; }
#phoneView #phone128Refresh { flex: 0 0 auto; }
#phoneView #phone128Refresh::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7v5h-5M4 17v-5h5M6 7a7 7 0 0 1 11.5-2L20 8M4 16l2.5 3A7 7 0 0 0 18 17'/%3E%3C/svg%3E") center / contain no-repeat;
}
#phoneView #phone128Message:empty { display: none; }
#phoneView #phone128Message:not(:empty) { margin: 0 0 20px; padding: 12px 15px; border: 1px solid #37836a; border-radius: 8px; background: #103d33; color: #d9f3df; font-size: 14px; overflow-wrap: anywhere; }
#phoneView #phone128Message.phone128-error { border-color: #96534f; background: #422b2b; color: #ffdad5; }
#phoneView .phone128-layout { display: grid; grid-template-columns: 286px minmax(0, 1fr); align-items: start; gap: 20px; }
#phoneView .phone128-layout > * { min-width: 0; }
#phoneView .phone128-layout > div { container-type: inline-size; }
#phoneView .sms-card {
  min-width: 0;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--phone156-line);
  border-radius: 12px;
  background: var(--phone156-panel);
  box-shadow: 0 8px 24px #00151624;
}
#phoneView .phone128-device { overflow: hidden; }
#phoneView .phone128-device::before {
  content: "DEINE RUFNUMMER";
  display: block;
  margin: 0 0 11px;
  color: #97b9b1;
  font-family: var(--phone156-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}
#phoneView #phone128Own { margin: 0 0 13px; font-family: var(--phone156-font); font-size: 26px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: .5px; overflow-wrap: anywhere; }
#phoneView #phone128PowerState { margin: 0 0 20px; color: #c4d9d2; font-size: 12px; line-height: 1.7; }
#phoneView :is(#phone128Power, #phone128Allocate) { width: 100%; }
#phoneView .phone128-device details { margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--phone156-line); }
#phoneView .phone128-device summary { position: relative; display: flex; align-items: center; gap: 9px; min-height: 30px; padding-right: 20px; color: #e1eee9; font-family: var(--phone156-font); font-size: 13px; font-weight: 650; list-style: none; cursor: pointer; }
#phoneView .phone128-device summary::-webkit-details-marker { display: none; }
#phoneView .phone128-device summary::after { content: ""; position: absolute; right: 2px; width: 7px; height: 7px; border-right: 1.5px solid #98b6ad; border-bottom: 1.5px solid #98b6ad; transform: rotate(45deg); }
#phoneView .phone128-device details[open] summary::after { transform: rotate(225deg); }
#phoneView .phone128-device details[open] summary { margin-bottom: 15px; }
#phoneView .phone128-device details p { margin: 0 0 14px; color: var(--phone156-muted); font-size: 12px; line-height: 1.7; }
#phoneView .phone128-device details label { font-size: 12px; line-height: 1.6; }
#phoneView .phone128-device details select { margin: 8px 0 10px; font-size: 12px; }
#phoneView .phone128-device details > button { width: 100%; margin-top: 9px; font-size: 12px; }
#phoneView #phone128Disconnect { color: #e8b5ad; background: transparent; border-color: #66514a; }
#phoneView #phone128Code:empty { display: none; }
#phoneView #phone128Code:not(:empty) { display: block; margin: 14px 0 4px; padding: 12px; border: 1px dashed #4c9273; border-radius: 7px; background: #062421; color: #b5f2b0; font-family: monospace; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
#phoneView #phone128Blocks .sms-contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
#phoneView #phone128Blocks button { min-height: 34px; padding: 7px 10px; font-size: 11px; }
#phoneView .phone128-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 0 0 18px; padding: 5px; border: 1px solid var(--phone156-line); border-radius: 10px; background: #052426; }
#phoneView .phone128-tabs button { min-width: 0; min-height: 45px; padding: 10px 9px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #a9c5bc; font-size: 14px; font-weight: 650; }
#phoneView .phone128-tabs button:hover:not(:disabled) { background: #0c3434; color: #e7f4ed; border-color: transparent; }
#phoneView .phone128-tabs button[aria-pressed="true"] { border-color: #3d785a; background: #124532; color: #edffe9; box-shadow: inset 0 -2px 0 var(--phone156-green); }
#phoneView .phone128-tabs button::before { content: ""; display: block; flex: 0 0 18px; width: 18px; height: 18px; background: currentColor; mask: var(--phone156-icon-call) center / contain no-repeat; }
#phoneView .phone128-tabs button[data-phone-tab="book"]::before { mask-image: var(--phone156-icon-book); }
#phoneView .phone128-tabs button[data-phone-tab="sms"]::before { mask-image: var(--phone156-icon-sms); }
#phoneView .phone128-tabs button[aria-pressed="true"]::before { color: var(--phone156-green); }
#phoneView .phone128-call-grid { display: grid; grid-template-columns: minmax(225px, .9fr) minmax(0, 1.1fr); gap: 24px; align-items: stretch; }
#phoneView #phone128DialForm { display: grid; align-content: start; gap: 12px; min-width: 0; margin: 0; }
#phoneView #phone128Number { min-height: 52px; font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: 1.5px; }
#phoneView .phone128-keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 2px 0; }
#phoneView .phone128-keypad button { min-width: 0; min-height: 52px; padding: 8px; background: #0b3536; border-color: #24534e; font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
#phoneView .phone128-keypad button[data-key="clear"] { color: #b2c7bd; font-size: 11px; }
#phoneView .phone128-keypad button[data-key="delete"] { color: #b2c7bd; font-size: 21px; }
#phoneView .phone128-call-grid > div { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; min-width: 0; padding: 26px 22px; border: 1px solid #174844; border-radius: 9px; background: var(--phone156-deep); text-align: center; }
#phoneView .phone128-call-grid > div::before { content: ""; display: block; flex: 0 0 52px; width: 52px; height: 52px; margin: 0 0 6px; background: #6bbaa0; opacity: .85; mask: var(--phone156-icon-call) center / 44px no-repeat; }
#phoneView #phone128CallState { margin: 0; color: #e0f1e8; font-size: 16px; font-weight: 600; line-height: 1.65; overflow-wrap: anywhere; }
#phoneView #phone128Rate { max-width: 360px; margin: 0; color: #a6c0b5; font-size: 12px; line-height: 1.8; }
#phoneView .phone128-call-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; width: 100%; }
#phoneView .phone128-call-actions:has(> button:not([hidden])) { margin-top: 8px; }
#phoneView .phone128-call-actions button { font-size: 12px; }
#phoneView :is(#phone128Allocate, #phone128Dial, #phone128Accept, #phone128Send, #phone128ContactForm > button) { border-color: var(--phone156-green); background: var(--phone156-green); color: #092b1a; font-weight: 750; }
#phoneView :is(#phone128Allocate, #phone128Dial, #phone128Accept, #phone128Send, #phone128ContactForm > button):hover:not(:disabled) { border-color: #7ee46d; background: #7ee46d; }
#phoneView :is(#phone128End, #phone128Reject) { border-color: #92544c; background: #5b302c; color: #ffe4df; }
#phoneView #phone128Dial { width: 100%; min-height: 46px; }
#phoneView .sms-compose-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
#phoneView .sms-compose-grid > .sms-card { min-height: 440px; }
#phoneView .sms-compose-grid > .sms-card:first-child { display: flex; flex-direction: column; }
#phoneView .sms-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 0; }
#phoneView .sms-compose-grid > .sms-card > .sms-actions { margin: 0 0 20px; padding-bottom: 18px; border-bottom: 1px solid var(--phone156-line); }
#phoneView :is(#phone128Inbox, #phone128Sent) { min-height: 38px; padding: 8px 12px; border-color: transparent; background: transparent; color: #a9c4ba; font-size: 12px; }
#phoneView :is(#phone128Inbox, #phone128Sent)[aria-pressed="true"] { border-color: #2c6552; background: #114333; color: #cbf4c1; }
#phoneView #phone128Messages { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#phoneView #phone128Messages:has(> p:only-child) { display: grid; align-content: center; justify-items: center; min-height: 260px; padding: 18px 0; }
#phoneView #phone128Messages:has(> p:only-child)::before { content: ""; width: 48px; height: 48px; margin-bottom: 16px; background: #579b88; mask: var(--phone156-icon-sms) center / contain no-repeat; }
#phoneView #phone128Messages > p:only-child { margin: 0; color: #b5cdc3; font-size: 13px; line-height: 1.7; text-align: center; }
#phoneView .sms-message { margin: 0 0 12px; padding: 16px; border: 1px solid #22524a; border-radius: 8px; background: #062729; }
#phoneView .sms-message:last-child { margin-bottom: 0; }
#phoneView .sms-message header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 7px 12px; }
#phoneView .sms-message header strong { color: #dff0e5; font-family: var(--phone156-font); font-size: 13px; font-weight: 650; }
#phoneView .sms-message time { color: #96b6aa; font-size: 11px; }
#phoneView .sms-message p { margin: 14px 0; color: #e2eee8; font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
#phoneView .sms-message button { min-height: 34px; padding: 7px 10px; font-size: 11px; }
#phoneView .sms-message button[data-action="reply"] { border-color: #367258; color: #b9efaa; }
#phoneView button:is([data-action="delete"], [data-action="contact_delete"]) { color: #e7b4a8; }
#phoneView #phone128Compose { display: grid; gap: 12px; margin: 0; }
#phoneView #phone128Compose label:not(:first-child) { margin-top: 4px; }
#phoneView #phone128Compose textarea { min-height: 172px; }
#phoneView #phone128Counter { margin: 0 0 3px; color: #a8c6b8; font-size: 12px; line-height: 1.6; }
#phoneView #phone128Counter.phone128-error { color: #ffaba1; font-weight: 700; }
#phoneView #phone128Send { justify-self: start; min-height: 43px; min-width: 135px; }
#phoneView #phone128Contacts { min-width: 0; margin-bottom: 26px; }
#phoneView #phone128Contacts > p:only-child { margin: 0; padding: 26px 20px; border: 1px dashed #316157; border-radius: 8px; background: #072729; color: #b2cdc0; font-size: 13px; line-height: 1.7; }
#phoneView .phone128-contact-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 10px; padding: 16px; border: 1px solid #20544b; border-radius: 8px; background: #062729; }
#phoneView .phone128-contact-row > div:first-child { min-width: 0; }
#phoneView .phone128-contact-row strong { display: block; color: #e6f5eb; font-family: var(--phone156-font); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
#phoneView .phone128-contact-row small { display: block; margin-top: 4px; color: #a3c6b3; font-size: 12px; font-variant-numeric: tabular-nums; }
#phoneView .phone128-contact-row button { min-height: 36px; padding: 8px 11px; font-size: 12px; }
#phoneView .phone128-contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: end; padding-top: 21px; border-top: 1px solid var(--phone156-line); }
#phoneView .phone128-contact-form::before { content: "KONTAKT HINZUFÜGEN"; grid-column: 1 / -1; color: #a7c9b7; font-family: var(--phone156-font); font-size: 10px; font-weight: 700; letter-spacing: .11em; }
#phoneView .phone128-contact-form input { margin-top: 8px; }
#phoneView #phone128ContactForm > button { justify-self: start; grid-column: 1 / -1; min-width: 160px; }
@container (max-width: 690px) {
  #phoneView .phone128-call-grid, #phoneView .sms-compose-grid { grid-template-columns: minmax(0, 1fr); }
  #phoneView #phone128DialForm { width: min(100%, 360px); justify-self: center; }
  #phoneView .phone128-call-grid > div { min-height: 220px; }
  #phoneView .sms-compose-grid > .sms-card { min-height: 0; }
  #phoneView .phone128-contact-row { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 1000px) {
  #phoneView .phone128-layout { grid-template-columns: 252px minmax(0, 1fr); gap: 16px; }
  #phoneView .sms-card { padding: 20px; }
  #phoneView #phone128Own { font-size: 23px; }
}
@media (max-width: 760px) {
  #phoneView { padding-top: 20px; }
  #phoneView .phone128-layout { grid-template-columns: minmax(0, 1fr); }
  #phoneView .sms-header { align-items: flex-start; gap: 12px; margin-bottom: 18px; padding-bottom: 18px; }
  #phoneView .sms-header h2 { font-size: 29px; }
  #phoneView .sms-header .eyebrow { font-size: 9px; letter-spacing: .1em; }
  #phoneView #phone128Policy { font-size: 12px; }
  #phoneView #phone128Refresh { min-height: 39px; padding: 9px 11px; font-size: 12px; }
  #phoneView .phone128-device { padding: 20px; }
  #phoneView #phone128Own { font-size: 27px; }
  #phoneView .phone128-device details { margin-top: 16px; padding-top: 14px; }
  #phoneView .phone128-tabs { margin-bottom: 16px; }
  #phoneView .phone128-tabs button { gap: 6px; font-size: 12px; }
  #phoneView .phone128-tabs button::before { width: 16px; height: 16px; flex-basis: 16px; }
  #phoneView .sms-card { padding: 20px; }
  #phoneView .phone128-contact-form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  #phoneView .sms-header { flex-wrap: wrap; }
  #phoneView .phone128-tabs button { gap: 5px; padding-inline: 5px; font-size: 11px; }
  #phoneView .sms-card { padding: 17px; }
}
@media (pointer: coarse) {
  #phoneView button, #phoneView .phone128-device summary { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  #phoneView button { transition: none; }
}
